Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] vantage6 package fails to install with Python 3.12 #1232

Closed
lsago opened this issue May 1, 2024 · 1 comment · Fixed by #1233
Closed

[Bug] vantage6 package fails to install with Python 3.12 #1232

lsago opened this issue May 1, 2024 · 1 comment · Fixed by #1233
Labels
bug Something isn't working status:new

Comments

@lsago
Copy link
Contributor

lsago commented May 1, 2024

Describe the bug
I can't seem to install vantage6 Python package when using Python 3.12

To Reproduce

$ docker run -it python:3.12 pip install vantage6==4.4.0
Collecting vantage6==4.4.0
  Downloading vantage6-4.4.0-py3-none-any.whl.metadata (10 kB)
...
Collecting cryptography==42.0.4 (from vantage6-common==4.4.0->vantage6==4.4.0)
  Downloading cryptography-42.0.4-cp39-abi3-manylinux_2_28_x86_64.whl.metadata (5.3 kB)
Collecting pyyaml>=5.3.1 (from copier==9.2.0->vantage6==4.4.0)
  Downloading PyYAML-6.0.tar.gz (124 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 125.0/125.0 kB 11.9 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [54 lines of output]
      running egg_info
      writing lib/PyYAML.egg-info/PKG-INFO
      writing dependency_links to lib/PyYAML.egg-info/dependency_links.txt
      writing top-level names to lib/PyYAML.egg-info/top_level.txt
      Traceback (most recent call last):
        File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-c05v1vsf/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-c05v1vsf/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-c05v1vsf/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 288, in <module>
        File "/tmp/pip-build-env-c05v1vsf/overlay/lib/python3.12/site-packages/setuptools/__init__.py", line 104, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-c05v1vsf/overlay/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 184, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-c05v1vsf/overlay/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-c05v1vsf/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-c05v1vsf/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 967, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-c05v1vsf/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-c05v1vsf/overlay/lib/python3.12/site-packages/setuptools/command/egg_info.py", line 321, in run
          self.find_sources()
        File "/tmp/pip-build-env-c05v1vsf/overlay/lib/python3.12/site-packages/setuptools/command/egg_info.py", line 329, in find_sources
          mm.run()
        File "/tmp/pip-build-env-c05v1vsf/overlay/lib/python3.12/site-packages/setuptools/command/egg_info.py", line 550, in run
          self.add_defaults()
        File "/tmp/pip-build-env-c05v1vsf/overlay/lib/python3.12/site-packages/setuptools/command/egg_info.py", line 588, in add_defaults
          sdist.add_defaults(self)
        File "/tmp/pip-build-env-c05v1vsf/overlay/lib/python3.12/site-packages/setuptools/command/sdist.py", line 102, in add_defaults
          super().add_defaults()
        File "/tmp/pip-build-env-c05v1vsf/overlay/lib/python3.12/site-packages/setuptools/_distutils/command/sdist.py", line 250, in add_defaults
          self._add_defaults_ext()
        File "/tmp/pip-build-env-c05v1vsf/overlay/lib/python3.12/site-packages/setuptools/_distutils/command/sdist.py", line 335, in _add_defaults_ext
          self.filelist.extend(build_ext.get_source_files())
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "<string>", line 204, in get_source_files
        File "/tmp/pip-build-env-c05v1vsf/overlay/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__
          raise AttributeError(attr)
      AttributeError: cython_sources
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Expected behavior
Successful installation

Details

  • OS: Linux
  • Version: 4.4.0
  • Python: 3.12
@lsago lsago added the bug Something isn't working label May 1, 2024
@lsago
Copy link
Contributor Author

lsago commented May 1, 2024

Problem

Issue seems to be that pyyaml uses some "deprecated distutils magic" for building that in turn depends on Cython < 3.0.0.

Right now docker run -it python:3.11 pip install vantage6==4.4.0 works, but docker run -it python:3.12 pip install vantage6==4.4.0 does not. I think this is because Vantage6 depends on PyYAML==6.0, and there seems to exist a built wheel for PyYAML-6.0 and Python 3.11 (Linux x86_64). But, there isn't one for PyYAML-6.0 and Python 3.12 (Linux x86_64), see: https://pypi.org/project/PyYAML/6.0/#files.

Solution?

Using pyyaml 6.0.1 should solve the issue I think. It should be able to build, and there is a wheel built already.

So, maybe changing the dependency to PyYAML==6.0.1 in vantage6-common, here:

vantage6-common/requirements.txt
8:PyYAML==6.0

vantage6-common/setup.py
41:        "PyYAML==6.0.1",

requirements.txt
57:PyYAML==6.0

Haven't thought about other platforms... but I expect this would be fine?

lsago added a commit that referenced this issue May 1, 2024
@lsago lsago linked a pull request May 1, 2024 that will close this issue
@bartvanb bartvanb closed this as completed May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working status:new
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants