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

Cartopy installation fails with setuptools 61.0.0 #2021

Closed
glentakahashi opened this issue Mar 25, 2022 · 1 comment
Closed

Cartopy installation fails with setuptools 61.0.0 #2021

glentakahashi opened this issue Mar 25, 2022 · 1 comment
Milestone

Comments

@glentakahashi
Copy link

glentakahashi commented Mar 25, 2022

Description

Cartopy fails installation with setuptools>=61.0.0

Code to reproduce

pip install --upgrade setuptools==61.0.0
pip install Cartopy

Traceback

pip install Cartopy==0.19.0.post1
Collecting Cartopy==0.19.0.post1
  Downloading Cartopy-0.19.0.post1.tar.gz (12.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.1/12.1 MB 12.7 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
  ╰─> [16 lines of output]
      Traceback (most recent call last):
        File "/home/hexuser/.cache/pypoetry/virtualenvs/python-kernel-OtKFaj5M-py3.8/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
          main()
        File "/home/hexuser/.cache/pypoetry/virtualenvs/python-kernel-OtKFaj5M-py3.8/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/home/hexuser/.cache/pypoetry/virtualenvs/python-kernel-OtKFaj5M-py3.8/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 130, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/tmp/pip-build-env-2z3zk1ql/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 177, in get_requires_for_build_wheel
          return self._get_build_requires(
        File "/tmp/pip-build-env-2z3zk1ql/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 159, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-2z3zk1ql/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 174, in run_setup
          exec(compile(code, __file__, 'exec'), locals())
        File "setup.py", line 35, in <module>
          from setuptools import Command, Extension, convert_path, setup
      ImportError: cannot import name 'convert_path' from 'setuptools' (/tmp/pip-build-env-2z3zk1ql/overlay/lib/python3.8/site-packages/setuptools/__init__.py)
      [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 setuptools removing the import for convert_path from distutils in the latest version
pypa/setuptools@v60.10.0...v61.0.0

@QuLogic
Copy link
Member

QuLogic commented Mar 26, 2022

Fixed by #2027.

@QuLogic QuLogic closed this as completed Mar 26, 2022
@QuLogic QuLogic added this to the 0.21 milestone Mar 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants