Pygmt on xp65

Hi, attempting to switch over to xp65 (module use /g/data/xp65/public/modules instead of hh5), but ran into this issue after “pip install pygmt”

---------------------------------------------------------------------------
GMTVersionError                           Traceback (most recent call last)
Cell In[3], line 1
----> 1 import sys, os, pygmt
      2 sys.path.insert(0, '/home/581/da1339/AFIM/src/AFIM/src')
      3 from sea_ice_processor          import SeaIceProcessor

File ~/.local/lib/python3.11/site-packages/pygmt/__init__.py:24
     21 import atexit as _atexit
     23 # Import modules to make the high-level GMT Python API
---> 24 from pygmt import datasets
     25 from pygmt._show_versions import __commit__, __version__, show_versions
     26 from pygmt.accessors import GMTDataArrayAccessor

File ~/.local/lib/python3.11/site-packages/pygmt/datasets/__init__.py:7
      1 """
      2 Functions to load GMT remote data and sample data.
      3 
      4 Data are downloaded from the GMT data server.
      5 """
----> 7 from pygmt.datasets.earth_age import load_earth_age
      8 from pygmt.datasets.earth_day import load_blue_marble
      9 from pygmt.datasets.earth_deflection import load_earth_deflection

File ~/.local/lib/python3.11/site-packages/pygmt/datasets/earth_age.py:12
      9 from typing import Literal
     11 import xarray as xr
---> 12 from pygmt.datasets.load_remote_dataset import _load_remote_dataset
     14 __doctest_skip__ = ["load_earth_age"]
     17 def load_earth_age(
     18     resolution: Literal[
     19         "01d", "30m", "20m", "15m", "10m", "06m", "05m", "04m", "03m", "02m", "01m"
   (...)
     22     registration: Literal["gridline", "pixel"] = "gridline",
     23 ) -> xr.DataArray:

File ~/.local/lib/python3.11/site-packages/pygmt/datasets/load_remote_dataset.py:10
      7 from typing import Any, Literal, NamedTuple
      9 import xarray as xr
---> 10 from pygmt.clib import Session
     11 from pygmt.exceptions import GMTInvalidInput
     12 from pygmt.helpers import build_arg_list, kwargs_to_strings

File ~/.local/lib/python3.11/site-packages/pygmt/clib/__init__.py:20
     15 if Version(__gmt_version__) < Version(required_gmt_version):
     16     msg = (
     17         f"Using an incompatible GMT version {__gmt_version__}. "
     18         f"Must be equal or newer than {required_gmt_version}."
     19     )
---> 20     raise GMTVersionError(msg)

GMTVersionError: Using an incompatible GMT version 6.3.0. Must be equal or newer than 6.4.0.

can someone with write permission please install the latest version of GMT https://www.generic-mapping-tools.org

This is inscope for support. I will find someone to assist you.

1 Like

Hi @dpath2o,

I have added pygmt with gmt=6.5.0 to conda/analysis3-25.05
Let me know if that works for you.

2 Likes

Thanks @rbeucher

Working well! Thank you again :slight_smile:

1 Like