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

pip install Cartopy error: Proj version 6.3.1 is installed, but cartopy requires at least version 8.0.0. #1967

Closed
paddygoat opened this issue Dec 14, 2021 · 7 comments

Comments

@paddygoat
Copy link

Error: Proj version 6.3.1 is installed, but cartopy requires at least version 8.0.0.

Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal

Tried every which way, installed Proj 8.0.0 from source. None of the solutions on stack exchange etc work for me :(
Great software BTW and installs and works well on NixOS.

goat@goat:~$ pip3 install Cartopy
Collecting Cartopy
Using cached Cartopy-0.20.1.tar.gz (10.8 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /tmp/tmp6aicdi6c get_requires_for_build_wheel /tmp/tmpkz2s9252
cwd: /tmp/pip-install-54dhuz9l/Cartopy
Complete output (1 lines):
Proj version 6.3.1 is installed, but cartopy requires at least version 8.0.0.

ERROR: Command errored out with exit status 1: /usr/bin/python3 /tmp/tmp6aicdi6c get_requires_for_build_wheel /tmp/tmpkz2s9252 Check the logs for full command output.

@dopplershift
Copy link
Contributor

Despite you building from source, it seems like it's still picking up your system copy of PROJ. Is there any way you can uninstall the system copy?

@CrucialSoftware
Copy link

I have also same error with same Ubuntu Distributor, tried to install proj 8.0.0 but failed.

@paddygoat
Copy link
Author

Despite you building from source, it seems like it's still picking up your system copy of PROJ. Is there any way you can uninstall the system copy?

Tried uninstalling proj with no success. Only current solution is to use conda to install cartopy, which is not ideal. Much prefer to use pip whenever possible.

@FlowMatric
Copy link

FlowMatric commented Mar 3, 2022

Same here, just tried installing with pipenv:

Installing cartopy...
Error:  An error occurred while installing cartopy!
Error text: Collecting cartopy
  Using cached Cartopy-0.20.2.tar.gz (10.8 MB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'

  ERROR: Command errored out with exit status 1:
   command: /home/fkluiben/workspace/afs-ehpfs/.venv/bin/python /tmp/tmp0tomy3x3 get_requires_for_build_wheel /tmp/tmpp12whjho
       cwd: /tmp/pip-install-khxeve3d/cartopy
  Complete output (1 lines):
  Proj version 6.3.1 is installed, but cartopy requires at least version 8.0.0.
  ----------------------------------------
ERROR: Command errored out with exit status 1: /home/fkluiben/workspace/afs-ehpfs/.venv/bin/python /tmp/tmp0tomy3x3 get_requires_for_build_wheel /tmp/tmpp12whjho Check the logs for full command output.

✘ Installation Failed ```

@dopplershift
Copy link
Contributor

The problem here is that PyPI doesn't have any concept of compiled, non-Python dependencies, so there's no PyPI package for PROJ. That means using the system package (if it's recent enough) or building from source and making sure pip links to it when building Cartopy. For that reason, Cartopy's CI system only relies on conda and conda-forge.

I've managed to make building PROJ from source and linking cartopy with it using these steps in a GitHub action for Metpy's CI system. The most important part is probably the environment variables that are set at the end of the action to ensure that the local build of PROJ is picked up.

@leandromferreiraUSP
Copy link

leandromferreiraUSP commented Apr 27, 2022

I had the same problem =\

@greglucas
Copy link
Contributor

PROJ is no longer explicitly required, so this should be solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants