-
Notifications
You must be signed in to change notification settings - Fork 388
Closed
Labels
Milestone
Description
Description
When trying to install Cartopy with pip, it fails to install the latest version because there is a mismatch between cartopy and metadata version. Because of that, pip fails to install the latest cartopy version and falls back to version 18, which installation fails because of incompatible proj version (as described in #2047).
The installation messages look like this:
$ pip install --user --upgrade cartopy
Collecting cartopy
Using cached Cartopy-0.20.2.tar.gz (10.8 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Discarding https://files.pythonhosted.org/packages/f6/55/1e1c737dc9436b320deead73d1c455ddbb74b8b6992081863492f6f6378a/Cartopy-0.20.2.tar.gz#sha256=4d08c198ecaa50a6a6b109d0f14c070e813defc046a83ac5d7ab494f85599e35 (from https://pypi.org/simple/cartopy/) (requires-python:>=3.7): Requested cartopy from https://files.pythonhosted.org/packages/f6/55/1e1c737dc9436b320deead73d1c455ddbb74b8b6992081863492f6f6378a/Cartopy-0.20.2.tar.gz#sha256=4d08c198ecaa50a6a6b109d0f14c070e813defc046a83ac5d7ab494f85599e35 has inconsistent version: filename has '0.20.2', but metadata has '0.0'
Using cached Cartopy-0.20.1.tar.gz (10.8 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Discarding https://files.pythonhosted.org/packages/fc/59/aa52698e3838f4cd0e7eaa75bd86837e9e0b05041dbdaee3cda2fffced06/Cartopy-0.20.1.tar.gz#sha256=91f87b130e2574547a20cd634498df97d797abd12dcfd0235bc0cdbcec8b05e3 (from https://pypi.org/simple/cartopy/) (requires-python:>=3.7): Requested cartopy from https://files.pythonhosted.org/packages/fc/59/aa52698e3838f4cd0e7eaa75bd86837e9e0b05041dbdaee3cda2fffced06/Cartopy-0.20.1.tar.gz#sha256=91f87b130e2574547a20cd634498df97d797abd12dcfd0235bc0cdbcec8b05e3 has inconsistent version: filename has '0.20.1', but metadata has '0.0'
Using cached Cartopy-0.20.0.tar.gz (10.8 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Discarding https://files.pythonhosted.org/packages/0f/c0/58453b036e79046d211f083880d58dcce787e7e07647ac25dc46c6555099/Cartopy-0.20.0.tar.gz#sha256=eae58aff26806e63cf115b2bce9477cedc4aa9f578c5e477b2c25cfa404f2b7a (from https://pypi.org/simple/cartopy/) (requires-python:>=3.7): Requested cartopy from https://files.pythonhosted.org/packages/0f/c0/58453b036e79046d211f083880d58dcce787e7e07647ac25dc46c6555099/Cartopy-0.20.0.tar.gz#sha256=eae58aff26806e63cf115b2bce9477cedc4aa9f578c5e477b2c25cfa404f2b7a has inconsistent version: filename has '0.20.0', but metadata has '0.0'
Using cached Cartopy-0.19.0.post1.tar.gz (12.1 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Discarding https://files.pythonhosted.org/packages/ed/ca/524ce33692df3faeaa56852fb6a33b0b410be94cc288417565b96fef3f64/Cartopy-0.19.0.post1.tar.gz#sha256=4b8b4773a98ed7009fe17d9b6ec87ac3ac62b7d14634d7768c190eadc647d576 (from https://pypi.org/simple/cartopy/) (requires-python:>=3.5): Requested cartopy from https://files.pythonhosted.org/packages/ed/ca/524ce33692df3faeaa56852fb6a33b0b410be94cc288417565b96fef3f64/Cartopy-0.19.0.post1.tar.gz#sha256=4b8b4773a98ed7009fe17d9b6ec87ac3ac62b7d14634d7768c190eadc647d576 has inconsistent version: filename has '0.19.0.post1', but metadata has '0.0'
Using cached Cartopy-0.18.0.tar.gz (14.4 MB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy>=1.10 in /usr/lib/python3/dist-packages (from cartopy) (1.21.5)
Requirement already satisfied: pyshp>=1.1.4 in ./.local/lib/python3.10/site-packages (from cartopy) (2.3.0)
Requirement already satisfied: setuptools>=0.7.2 in /usr/lib/python3/dist-packages (from cartopy) (59.6.0)
Requirement already satisfied: shapely>=1.5.6 in ./.local/lib/python3.10/site-packages (from cartopy) (1.8.2)
Requirement already satisfied: six>=1.3.0 in /usr/lib/python3/dist-packages (from cartopy) (1.16.0)
Building wheels for collected packages: cartopy
Building wheel for cartopy (setup.py) ... error
I finally managed to install the latest version as suggested by this SO post. with
pip install --upgrade --no-cache-dir --use-deprecated=legacy-resolver --user cartopy
But obviously this is just a workaround.
System configuration
Ubuntu 22.04
Python 3.10.5
pip 22.0.2
89erik and hajkeats