matplotlib / basemap

Plot on map projections (with coastlines and political boundaries) using matplotlib

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Basemap: solving environment failed

timonovart opened this issue · comments

Hello! I had this problem which I could not solve myself for several days. It seems like some conflict of dependencies — I tried playing with different versions of packages and creating venvs but it did not help and the error is always the same. What am I doing wrong?..

 - defaults
Platform: osx-arm64
Collecting package metadata (repodata.json): done
Solving environment: / warning  libmamba Added empty dependency for problem type SOLVER_RULE_UPDATE
failed

LibMambaUnsatisfiableError: Encountered problems while solving:
  - package basemap-1.2.2-py39hd91d049_1 has constraint proj <6 conflicting with proj-7.2.0-heac154c_1

Could not solve for environment specs
The following packages are incompatible
├─ basemap is installable with the potential options
│  ├─ basemap 1.2.2 would require
│  │  └─ proj [<6 |>=7.2.0,<7.2.1.0a0 ] with the potential options
│  │     ├─ proj 7.2.0, which can be installed;
│  │     └─ proj <6 conflicts with any installable versions previously reported;
│  ├─ basemap [1.2.2|1.3.2|1.3.6|1.4.0] would require
│  │  └─ python >=3.10,<3.11.0a0 , which can be installed;
│  ├─ basemap [1.2.2|1.3.2|1.3.6|1.4.0] would require
│  │  └─ python >=3.8,<3.9.0a0 , which can be installed;
│  ├─ basemap 1.2.2 would require
│  │  └─ proj [ |<6 ] with the potential options
│  │     ├─ proj 7.2.0, which can be installed;
│  │     ├─ proj [6.2.1|8.2.1|9.3.1], which can be installed;
│  │     └─ proj <6 conflicts with any installable versions previously reported;
│  ├─ basemap [1.3.2|1.3.6|1.4.0] would require
│  │  └─ proj <6 , which conflicts with any installable versions previously reported;
│  ├─ basemap [1.3.6|1.4.0] would require
│  │  └─ python >=3.11,<3.12.0a0 , which can be installed;
│  └─ basemap 1.4.0 would require
│     └─ python >=3.12,<3.13.0a0 , which can be installed;
├─ pin-1 is not installable because it requires
│  └─ python 3.9.* , which conflicts with any installable versions previously reported;
└─ proj 7.2.0  is requested and can be installed.

Pins seem to be involved in the conflict. Currently pinned specs:
 - python 3.9.* (labeled as 'pin-1')```

Hi @timonovart! Are you using Anaconda or conda-forge channels? I would avoid installing any basemap older than 1.3.0. In principle, there should be conda packages for Python 3.9 on MacOS ARM64, see e.g.

https://anaconda.org/conda-forge/basemap/1.4.0/download/osx-arm64/basemap-1.4.0-np126py39h95066b0_2.conda
https://anaconda.org/conda-forge/basemap/1.3.9/download/osx-arm64/basemap-1.3.9-py39hb118012_0.conda

So what is looking surprising to me is that mamba is not able to find newer basemap packages for Python 3.9 on MacOS ARM64 (which are indeed available), so it needs to go down to basemap 1.2.2 (super old), which brings you conflicts because of the too old PROJ dependency which this old basemap needs.

Hello @molinav ! Thank you for your response! Actually, this was the most recent output after I've done a lot of 'playing' around. The first one was this, and it mentioned the newest versions of basemap as far as I see. As I am maybe a total newbie, I am not sure what channel am I using and how to check it even... But the command was just 'conda install basemap'.

The first output was:

 - defaults
Platform: osx-arm64
Collecting package metadata (repodata.json): done
Solving environment: / warning  libmamba Added empty dependency for problem type SOLVER_RULE_UPDATE
failed

LibMambaUnsatisfiableError: Encountered problems while solving:
  - package pyproj-3.4.1-py311h0c26271_0 requires proj >=8.2.1,<8.2.2.0a0, but none of the providers can be installed

Could not solve for environment specs
The following packages are incompatible
├─ basemap is installable with the potential options
│  ├─ basemap 1.3.6 would require
│  │  ├─ proj <6 , which can be installed;
│  │  └─ pyproj >=1.9.3,<3.5.0  with the potential options
│  │     ├─ pyproj 3.4.1 would require
│  │     │  └─ proj >=8.2.1,<8.2.2.0a0 , which conflicts with any installable versions previously reported;
│  │     ├─ pyproj [3.1.0|3.3.0|3.4.1|3.6.1] would require
│  │     │  └─ python >=3.10,<3.11.0a0 , which can be installed;
│  │     ├─ pyproj [3.1.0|3.3.0|3.4.1] would require
│  │     │  └─ python >=3.8,<3.9.0a0 , which can be installed;
│  │     └─ pyproj [3.1.0|3.3.0|3.4.1|3.6.1] would require
│  │        └─ python >=3.9,<3.10.0a0 , which can be installed;
│  ├─ basemap [1.2.2|1.3.2|1.3.6|1.4.0] would require
│  │  └─ python >=3.10,<3.11.0a0 , which can be installed;
│  ├─ basemap [1.2.2|1.3.2|1.3.6|1.4.0] would require
│  │  └─ python >=3.8,<3.9.0a0 , which can be installed;
│  ├─ basemap [1.2.2|1.3.2|1.3.6|1.4.0] would require
│  │  └─ python >=3.9,<3.10.0a0 , which can be installed;
│  ├─ basemap 1.4.0 would require
│  │  ├─ proj <6 , which can be installed;
│  │  └─ pyproj >=1.9.3,<3.7.0  with the potential options
│  │     ├─ pyproj 3.4.1, which cannot be installed (as previously explained);
│  │     ├─ pyproj [3.1.0|3.3.0|3.4.1|3.6.1], which can be installed (as previously explained);
│  │     ├─ pyproj [3.1.0|3.3.0|3.4.1], which can be installed (as previously explained);
│  │     ├─ pyproj [3.1.0|3.3.0|3.4.1|3.6.1], which can be installed (as previously explained);
│  │     ├─ pyproj 3.6.1 would require
│  │     │  └─ proj >=9.3.1,<9.3.2.0a0 , which conflicts with any installable versions previously reported;
│  │     └─ pyproj 3.6.1 would require
│  │        └─ python >=3.12,<3.13.0a0 , which can be installed;
│  └─ basemap 1.4.0 would require
│     └─ python >=3.12,<3.13.0a0 , which can be installed;
└─ pin-1 is not installable because it requires
   └─ python 3.11.* , which conflicts with any installable versions previously reported.

Pins seem to be involved in the conflict. Currently pinned specs:
 - python 3.11.* (labeled as 'pin-1')

Does it make any difference if you do conda install -c conda-forge basemap?

Dear @molinav , somehow 'conda install basemap --channel conda-forge' helped! Thank you!