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

Unable to install version 3.1.2 #32

Open
RandUser123sa opened this issue May 2, 2024 · 3 comments
Open

Unable to install version 3.1.2 #32

RandUser123sa opened this issue May 2, 2024 · 3 comments

Comments

@RandUser123sa
Copy link

Im trying to install the project with:

pip3 install barectf

and receive the error:
Collecting barectf
Using cached barectf-3.1.2-py3-none-any.whl.metadata (1.5 kB)
Requirement already satisfied: jinja2<4.0,>=3.0 in /usr/lib/python3.11/site-packages (from barectf) (3.1.3)
Collecting jsonschema<4.0,>=3.2 (from barectf)
Using cached jsonschema-3.2.0-py2.py3-none-any.whl.metadata (7.8 kB)
Collecting pyyaml<6.0,>=5.3 (from barectf)
Using cached PyYAML-5.4.1.tar.gz (175 kB)
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 lib3/PyYAML.egg-info/PKG-INFO
writing dependency_links to lib3/PyYAML.egg-info/dependency_links.txt
writing top-level names to lib3/PyYAML.egg-info/top_level.txt
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in
main()
File "/usr/lib/python3.11/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/lib/python3.11/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-98c8zk71/overlay/lib/python3.11/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-98c8zk71/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-98c8zk71/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup
exec(code, locals())
File "", line 271, in
File "/tmp/pip-build-env-98c8zk71/overlay/lib/python3.11/site-packages/setuptools/init.py", line 104, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-98c8zk71/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 184, in setup
return run_commands(dist)
^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-98c8zk71/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
dist.run_commands()
File "/tmp/pip-build-env-98c8zk71/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/tmp/pip-build-env-98c8zk71/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 967, in run_command
super().run_command(command)
File "/tmp/pip-build-env-98c8zk71/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-98c8zk71/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 321, in run
self.find_sources()
File "/tmp/pip-build-env-98c8zk71/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 329, in find_sources
mm.run()
File "/tmp/pip-build-env-98c8zk71/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 550, in run
self.add_defaults()
File "/tmp/pip-build-env-98c8zk71/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 588, in add_defaults
sdist.add_defaults(self)
File "/tmp/pip-build-env-98c8zk71/overlay/lib/python3.11/site-packages/setuptools/command/sdist.py", line 102, in add_defaults
super().add_defaults()
File "/tmp/pip-build-env-98c8zk71/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/sdist.py", line 250, in add_defaults
self._add_defaults_ext()
File "/tmp/pip-build-env-98c8zk71/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/sdist.py", line 335, in _add_defaults_ext
self.filelist.extend(build_ext.get_source_files())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 201, in get_source_files
File "/tmp/pip-build-env-98c8zk71/overlay/lib/python3.11/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.

@eepp
Copy link
Member

eepp commented May 2, 2024

This seems to be caused by an incompatibility between PyYAML and the latest version of Cython (they recently bumped the major to 3).

The merged fix is to continue to require an older version of Cython as such:

[build-system]
requires = ["setuptools", "wheel", "Cython<3.0"]

until we can rewrite the extension build to eliminate all the ancient deprecated distutils magic

I believe this fix is part of the PyYAML 6.0.1 release, but barectf requires:

pyyaml = '^5.3'

I'll see if the project can accept and work with PyYAML 6.0.

In the meantime, you may force pip3 to use an older of Cython yourself:

$ echo 'Cython<3' > constraint.txt
$ PIP_CONSTRAINT=constraint.txt pip3 install barectf

Tell me if this helps.

@RandUser123sa
Copy link
Author

this way is working:
echo 'Cython<3' > constraint.txt
PIP_CONSTRAINT=constraint.txt pip3 install barectf

@eepp
Copy link
Member

eepp commented May 2, 2024

This is not completed, I wrote above:

I'll see if the project can accept and work with PyYAML 6.0.

Keep this open.

@eepp eepp reopened this May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants