cartopy icon indicating copy to clipboard operation
cartopy copied to clipboard

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

Open paddygoat opened this issue 4 years ago • 6 comments

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.

paddygoat avatar Dec 14 '21 14:12 paddygoat

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?

dopplershift avatar Dec 14 '21 20:12 dopplershift

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

CrucialSoftware avatar Dec 17 '21 06:12 CrucialSoftware

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.

paddygoat avatar Dec 17 '21 09:12 paddygoat

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 ```

FlowMatric avatar Mar 03 '22 17:03 FlowMatric

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.

dopplershift avatar Mar 03 '22 19:03 dopplershift

I had the same problem =\

leandromferreiraUSP avatar Apr 27 '22 01:04 leandromferreiraUSP

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

greglucas avatar Sep 11 '22 02:09 greglucas