"conda update --all" downgraded GMT

I have a conda environment “pygmt” where I have installed PyGMT from the conda-forge. I upgraded PyGMT to v0.12 a week or two ago when it was released. Today, I ran “conda update --all” in the environment and it decided to downgrade GMT to v6.4.0. Has anybody see this before? I was able to get GMT back to v.6.5 by forcing it with “conda install gmt=6.5.0”.

Hmm, not sure why. It might be that the solver was trying to update some other package in your conda environment, and that depended on an older version of some library (e.g. gdal) that forced a downgrade to GMT 6.4.0.

We’re updating doing a few updates today to build GMT with GDAL 3.9.0 at GitHub - conda-forge/gmt-feedstock: A conda-smithy repository for gmt., will hopefully help to make things more compatible across other conda packages.

Hum…interesting…
Yesterday I updated one of my repositories changing some code for pygmt 0.12.0 and gmt 6.5.0 (check out GitHub - andrebelem/3D-Antarctic-maps: Crafting 3D maps of Antarctica with PyGMT and the new IBCSO V2 data) and after running “conda env update --name pygmt --file environment.yml --prune” I got a conflict with gdal

/home/abelem/miniforge3/envs/pygmt/bin/gmt: symbol lookup error: /home/abelem/miniforge3/envs/pygmt/bin/../lib/./libgdal.so.35: undefined symbol: sqlite3_total_changes64

@weiji14 do you think I need to put explicitily the GDAL dependence on environment.yml ?

I modified my environment.yml to gmt=6.4.0 and now the conflict is clear:

LibMambaUnsatisfiableError: Encountered problems while solving:
  - package libgdal-core-3.9.1-h1d1841c_8 requires geos >=3.12.2,<3.12.3.0a0, but none of the providers can be installed

Could not solve for environment specs
The following packages are incompatible
├─ gmt 6.4.0**  is installable with the potential options
│  ├─ gmt 6.4.0 would require
│  │  └─ geos >=3.10.3,<3.10.4.0a0 , which can be installed;
│  ├─ gmt 6.4.0 would require
│  │  └─ geos >=3.11.0,<3.11.1.0a0 , which can be installed;
│  ├─ gmt 6.4.0 would require
│  │  └─ geos >=3.11.2,<3.11.3.0a0 , which can be installed;
│  ├─ gmt 6.4.0 would require
│  │  └─ geos >=3.12.0,<3.12.1.0a0 , which can be installed;
│  ├─ gmt 6.4.0 would require
│  │  └─ geos >=3.11.1,<3.11.2.0a0 , which can be installed;
│  └─ gmt 6.4.0 would require
│     └─ geos >=3.12.1,<3.12.2.0a0 , which can be installed;
└─ libgdal-core is not installable because it requires
   └─ geos >=3.12.2,<3.12.3.0a0 , which conflicts with any installable versions previously reported.

I ran conda update --all in my pygmt environment again today, and it did a minor update to the GMT 6.5.0 while updating a lot of other stuff. I am not sure if this would have worked if I had not pinned the gmt=6.5.0. I did not have time to test that.
This is the new version list in my environment:

PyGMT information:
  version: v0.12.0
System information:
  python: 3.11.9 | packaged by conda-forge | (main, Apr 19 2024, 18:34:54) [Clang 16.0.6 ]
  executable: /Users/fielding/anaconda3/envs/pygmt/bin/python
  machine: macOS-14.5-arm64-arm-64bit
Dependency information:
  numpy: 1.26.4
  pandas: 2.2.2
  xarray: 2024.6.0
  netCDF4: 1.7.1
  packaging: 24.1
  contextily: 1.6.0
  geopandas: 1.0.1
  ipython: None
  rioxarray: 0.17.0
  ghostscript: 10.03.1
GMT library information:
  binary version: 6.5.0
  cores: 10
  grid layout: rows
  image layout: 
  library path: /Users/fielding/anaconda3/envs/pygmt/lib/libgmt.dylib
  padding: 2
  plugin dir: /Users/fielding/anaconda3/envs/pygmt/lib/gmt/plugins
  share dir: /Users/fielding/anaconda3/envs/pygmt/share/gmt
  version: 6.5.0

It seems that the pygmt.show_versions does not output the version of GDAL.

1 Like

Yep. It’s the same for me. In my case, I solved the conflict by reinstalling the whole environment.