oracle / graalpython

GraalPy – A high-performance embeddable Python 3 runtime for Java
https://www.graalvm.org/python/
Other
1.24k stars 108 forks source link

Compatibility: cannot install PyYAML due to missing module _sysconfigdata #257

Closed mikehearn closed 2 years ago

mikehearn commented 2 years ago

pip install pyyaml yields

ERROR: Exception:
Traceback (most recent call last):
  File "/Users/mike/Downloads/graalvm-ee-java17-22.0.0/Contents/Home/bin/venv/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 188, in _main
    status = self.run(options, args)
  File "/Users/mike/Downloads/graalvm-ee-java17-22.0.0/Contents/Home/bin/venv/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 185, in wrapper
    return func(self, options, args)
  File "/Users/mike/Downloads/graalvm-ee-java17-22.0.0/Contents/Home/bin/venv/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 332, in run
    requirement_set = resolver.resolve(
  File "/Users/mike/Downloads/graalvm-ee-java17-22.0.0/Contents/Home/bin/venv/lib/python3.8/site-packages/pip/_internal/resolution/legacy/resolver.py", line 179, in resolve
    discovered_reqs.extend(self._resolve_one(requirement_set, req))
  File "/Users/mike/Downloads/graalvm-ee-java17-22.0.0/Contents/Home/bin/venv/lib/python3.8/site-packages/pip/_internal/resolution/legacy/resolver.py", line 362, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/Users/mike/Downloads/graalvm-ee-java17-22.0.0/Contents/Home/bin/venv/lib/python3.8/site-packages/pip/_internal/resolution/legacy/resolver.py", line 314, in _get_abstract_dist_for
    abstract_dist = self.preparer.prepare_linked_requirement(req)
  File "/Users/mike/Downloads/graalvm-ee-java17-22.0.0/Contents/Home/bin/venv/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 487, in prepare_linked_requirement
    abstract_dist = _get_prepared_distribution(
  File "/Users/mike/Downloads/graalvm-ee-java17-22.0.0/Contents/Home/bin/venv/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 91, in _get_prepared_distribution
    abstract_dist.prepare_distribution_metadata(finder, build_isolation)
  File "/Users/mike/Downloads/graalvm-ee-java17-22.0.0/Contents/Home/bin/venv/lib/python3.8/site-packages/pip/_internal/distributions/sdist.py", line 38, in prepare_distribution_metadata
    self._setup_isolation(finder)
  File "/Users/mike/Downloads/graalvm-ee-java17-22.0.0/Contents/Home/bin/venv/lib/python3.8/site-packages/pip/_internal/distributions/sdist.py", line 96, in _setup_isolation
    reqs = backend.get_requires_for_build_wheel()
  File "/Users/mike/Downloads/graalvm-ee-java17-22.0.0/Contents/Home/bin/venv/lib/python3.8/site-packages/pip/_vendor/pep517/wrappers.py", line 160, in get_requires_for_build_wheel
    return self._call_hook('get_requires_for_build_wheel', {
  File "/Users/mike/Downloads/graalvm-ee-java17-22.0.0/Contents/Home/bin/venv/lib/python3.8/site-packages/pip/_vendor/pep517/wrappers.py", line 265, in _call_hook
    raise BackendUnavailable(data.get('traceback', ''))
pip._vendor.pep517.wrappers.BackendUnavailable: Traceback (most recent call last):
  File "/private/var/folders/dk/d4lhz82d1dq58h5bk8wjwfwh0000gn/T/pip-build-env-d8qeteyv/overlay/lib/python3.8/site-packages/setuptools/_distutils/sysconfig.py", line 454, in _init_posix
    _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
ModuleNotFoundError: No module named '_sysconfigdata__darwin_x86_64-darwin'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/mike/Downloads/graalvm-ee-java17-22.0.0/Contents/Home/bin/venv/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 86, in _build_backend
    obj = import_module(mod_path)
  File "/Users/mike/Downloads/graalvm-ee-java17-22.0.0/Contents/Home/languages/python/lib-python/3/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/private/var/folders/dk/d4lhz82d1dq58h5bk8wjwfwh0000gn/T/pip-build-env-d8qeteyv/overlay/lib/python3.8/site-packages/setuptools/__init__.py", line 18, in <module '__init__.py'>
    from setuptools.dist import Distribution
  File "/private/var/folders/dk/d4lhz82d1dq58h5bk8wjwfwh0000gn/T/pip-build-env-d8qeteyv/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 36, in <module 'dist.py'>
    import setuptools.command
  File "/private/var/folders/dk/d4lhz82d1dq58h5bk8wjwfwh0000gn/T/pip-build-env-d8qeteyv/overlay/lib/python3.8/site-packages/setuptools/command/__init__.py", line 1, in <module '__init__.py'>
    from distutils.command.bdist import bdist
  File "/private/var/folders/dk/d4lhz82d1dq58h5bk8wjwfwh0000gn/T/pip-build-env-d8qeteyv/overlay/lib/python3.8/site-packages/setuptools/_distutils/command/bdist.py", line 24, in <module 'bdist.py'>
    class bdist(Command):
  File "/private/var/folders/dk/d4lhz82d1dq58h5bk8wjwfwh0000gn/T/pip-build-env-d8qeteyv/overlay/lib/python3.8/site-packages/setuptools/_distutils/command/bdist.py", line 32, in bdist
    "(default: %s)" % get_platform()),
  File "/private/var/folders/dk/d4lhz82d1dq58h5bk8wjwfwh0000gn/T/pip-build-env-d8qeteyv/overlay/lib/python3.8/site-packages/setuptools/_distutils/util.py", line 110, in get_platform
    return get_host_platform()
  File "/private/var/folders/dk/d4lhz82d1dq58h5bk8wjwfwh0000gn/T/pip-build-env-d8qeteyv/overlay/lib/python3.8/site-packages/setuptools/_distutils/util.py", line 95, in get_host_platform
    distutils.sysconfig.get_config_vars(),
  File "/private/var/folders/dk/d4lhz82d1dq58h5bk8wjwfwh0000gn/T/pip-build-env-d8qeteyv/overlay/lib/python3.8/site-packages/setuptools/_distutils/sysconfig.py", line 498, in get_config_vars
    func()
  File "/private/var/folders/dk/d4lhz82d1dq58h5bk8wjwfwh0000gn/T/pip-build-env-d8qeteyv/overlay/lib/python3.8/site-packages/setuptools/_distutils/sysconfig.py", line 457, in _init_posix
    _temp = __import__(
ModuleNotFoundError: No module named '_sysconfigdata'

Is _sysconfigdata hard to implement?

msimacek commented 2 years ago

Hi, @mikehearn, thank you for the bugreport. It's a problem with a new release of setuptools and we are already working on it. We have added the _sysconfigdata module but there's more changes that still need to be done.