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

installation failure when using pep517 #24

Open
cryptk opened this issue May 3, 2024 · 4 comments · May be fixed by #26
Open

installation failure when using pep517 #24

cryptk opened this issue May 3, 2024 · 4 comments · May be fixed by #26

Comments

@cryptk
Copy link

cryptk commented May 3, 2024

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.

@d3tk
Copy link

d3tk commented Jun 8, 2024

I'm running into the same problem. Do you have a way to install the package? Perhaps using a different PEP version?

@d3tk
Copy link

d3tk commented Jun 8, 2024

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

@kszlim kszlim linked a pull request Jun 18, 2024 that will close this issue
@Franck-Dernoncourt
Copy link

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

@Puer-Hyun
Copy link

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

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

Successfully merging a pull request may close this issue.

4 participants