pip install Cartopy error: Proj version 6.3.1 is installed, but cartopy requires at least version 8.0.0.
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.
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?
I have also same error with same Ubuntu Distributor, tried to install proj 8.0.0 but failed.
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.
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 ```
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.
I had the same problem =\
PROJ is no longer explicitly required, so this should be solved.