barectf icon indicating copy to clipboard operation
barectf copied to clipboard

Unable to install version 3.1.2

Open RandUser123sa opened this issue 1 year ago • 4 comments

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.

RandUser123sa avatar May 02 '24 14:05 RandUser123sa

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.

eepp avatar May 02 '24 15:05 eepp

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

RandUser123sa avatar May 02 '24 19:05 RandUser123sa

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 avatar May 02 '24 19:05 eepp

Any updates on this one? Another problem I see is that the barectf requires old jsonchema which easily conflicts with other packages. So when installing the barectf, I see message to require jsonchema between 3.2 and 4.0

Collecting jsonschema<4.0,>=3.2 (from barectf)
  Using cached jsonschema-3.2.0-py2.py3-none-any.whl.metadata (7.8 kB)

And then when installing jubyperlab-server, it requires newer jsonchema

jupyterlab-server 2.27.2 requires jsonschema>=4.18.0, but you have jsonschema 3.2.0 which is incompatible.

lamikr avatar Jun 30 '24 06:06 lamikr