installation failure when using pep517
cryptk opened this issue · 4 comments
When installing via pip and using pep-517 via the following command pip install --use-pep517 causal-conv1d
the following error occurs:
Collecting causal-conv1d
Using cached causal_conv1d-1.2.0.post2.tar.gz (7.1 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
╰─> [20 lines of output]
Traceback (most recent call last):
File "/home/cryptk/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/home/cryptk/venv/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 "/home/cryptk/venv/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-rfotbm2o/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-rfotbm2o/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-rfotbm2o/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 487, in run_setup
super().run_setup(setup_script=setup_script)
File "/tmp/pip-build-env-rfotbm2o/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup
exec(code, locals())
File "<string>", line 10, in <module>
ModuleNotFoundError: No module named 'packaging'
[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.
this is due to the project not specifying it's build dependencies per PEP 517. This means that any tool that uses pep517 by default will fail to install this package. Eventually pep 517 will become the default for pip, so it would be best to get ahead of this sooner rather than later.
I'm running into the same problem. Do you have a way to install the package? Perhaps using a different PEP version?
I'm running into the same problem. Do you have a way to install the package? Perhaps using a different PEP version?
i was able to solve it by deleting pkg_resources
, setuptools
and, setuptools-<version>.dist-info
then doing pip install setuptools==69.5.1
and then pip install causal-conv1d
worked
Upgrading setuptools from 69.5.1 to the latest available version (72.1.0) fixed the issue on my side (Ubuntu 20.04 + Python 3.11).
pip install -U setuptools
Nothing to add.
(mymambav-py3.10) admin@82d599685e60:/data/Mambavision$ pip uninstall -y pkg_resources setuptools
WARNING: Skipping pkg_resources as it is not installed.
Found existing installation: setuptools 72.1.0
Uninstalling setuptools-72.1.0:
Successfully uninstalled setuptools-72.1.0
(mymambav-py3.10) admin@82d599685e60:/data/Mambavision$ pip install setuptools==69.5.1
Collecting setuptools==69.5.1
Downloading setuptools-69.5.1-py3-none-any.whl.metadata (6.2 kB)
Downloading setuptools-69.5.1-py3-none-any.whl (894 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 894.6/894.6 kB 3.6 MB/s eta 0:00:00
Installing collected packages: setuptools
Successfully installed setuptools-69.5.1
[notice] A new release of pip is available: 24.0 -> 24.2
[notice] To update, run: pip install --upgrade pip
(mymambav-py3.10) admin@82d599685e60:/data/Mambavision$ pip install causal-conv1d
I tried to clear pkg_resources
but couldn't, and setuptools
was 72.1.0, which is impossible. I didn't do setuptools-<version>.dist-info
, but I installed setuptools==69.5.1
and it worked.
tl;dr
pip uninstall -y setuptools
pip install setuptools==69.5.1
pip install causal-conv1d