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 fails with setuptools>=75.0.0 #34

Open
Schmaexxi opened this issue Oct 1, 2024 · 3 comments
Open

Installation fails with setuptools>=75.0.0 #34

Schmaexxi opened this issue Oct 1, 2024 · 3 comments

Comments

@Schmaexxi
Copy link

Hi! Even though this repo doesn't seem active any more, I'll put this out here in case anyone else has an issue installing this package.

Problem description

Cannot install pyinterval with setuptools>=75.0.0 due to major changes in setuptools.
Crlibm, which is a direct dependency of pyinterval fails to install due to the changes in setuptools (specific error below)

My speccs

  • Apple M1 Max
  • 32GB memory

Tested with: Python 3.10, 3.11

The same error occurs in a Github runner on Ubuntu 22.04.5 LTS with Python 3.10

Installation failure shell output

pip install --no-cache pyinterval                                                                                                                                                                        ml/aint/ci [6c4db28870]
Looking in indexes: https://pypi.org/simple
Collecting pyinterval
  Downloading pyinterval-1.2.0.tar.gz (25 kB)
  Preparing metadata (setup.py) ... done
Collecting crlibm==1.*,>=1.0.3 (from pyinterval)
  Downloading crlibm-1.0.3.tar.gz (1.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 MB 1.4 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/km/d_mh08b54j52lf5b16g476k40000gn/T/pip-install-9drerz7x/crlibm_43dfd5bfd6bb44ed8de5cfd7748b06ef/setup.py", line 15, in <module>
          from distutils.command.upload import upload
      ModuleNotFoundError: No module named 'distutils.command.upload'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Looking at crlibm's setup.py, it shows the failing import.
I haven't looked into why setuptools removed this but it definitely makes this part fail. Their changelog states the removal in v75.0.0, which refers to this commit

Workaround

Use setuptools<=74.1.3

@Iaotle
Copy link

Iaotle commented Oct 24, 2024

Thanks!

@rubnov
Copy link

rubnov commented Nov 4, 2024

I'm using setuptools==74.1.3 with python 3.11.4 and still running into the same issue.

$ pip install --no-cache pyinterval
Collecting pyinterval
  Downloading pyinterval-1.2.0.tar.gz (25 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting crlibm==1.*,>=1.0.3 (from pyinterval)
  Downloading crlibm-1.0.3.tar.gz (1.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 MB 45.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
  ╰─> [20 lines of output]
      Traceback (most recent call last):
File "/Users/myuser/.pyenv/versions/3.11.4/envs/venv3114/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/myuser/.pyenv/versions/3.11.4/envs/venv3114/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 "/Users/myuser/.pyenv/versions/3.11.4/envs/venv3114/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 "/private/var/folders/vt/2r91wcsj4s9dg7cd0y9tqrkr0000gn/T/pip-build-env-6x6k1js2/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 333, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/vt/2r91wcsj4s9dg7cd0y9tqrkr0000gn/T/pip-build-env-6x6k1js2/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 303, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/vt/2r91wcsj4s9dg7cd0y9tqrkr0000gn/T/pip-build-env-6x6k1js2/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 521, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/private/var/folders/vt/2r91wcsj4s9dg7cd0y9tqrkr0000gn/T/pip-build-env-6x6k1js2/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 319, in run_setup
          exec(code, locals())
        File "<string>", line 15, in <module>
      ModuleNotFoundError: No module named 'distutils.command.upload'
      [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.

UPDATE
pip install --upgrade wheel resolved the issue.

@nachiket
Copy link

The wheel update didn't fix it for me on M3 mac

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

4 participants