Worked !
The sequence was:
(1) update VM colab
!sudo apt update
!sudo apt upgrade -y
!sudo apt install -y build-essential cmake libcurl4-gnutls-dev libnetcdf-dev gdal-bin libgdal-dev libfftw3-dev libpcre3-dev liblapack-dev libblas-dev libglib2.0-dev ghostscript ghostscript-x graphicsmagick ffmpeg xdg-utils
(2) Install gmt from github
!git clone --depth 50 https://github.com/GenericMappingTools/gmt
(3) make everthing !
!cmake /content/gmt
(4) install
!cmake --build . --target install
(5) Install pygmt
!pip install pygmt
(6) use and enjoy
import pygmt
fig = pygmt.Figure()
pygmt.config(MAP_FRAME_TYPE="plain")
pygmt.config(FORMAT_GEO_MAP="DF")
fig.coast(
shorelines="1/0.5p",
region=[-100, -20, -70, -45],
projection="L-60/-60/-70/-45/12c",
land="gray",
borders=["1/thick,black", "2/thin,black"],
frame=['a15f5g15','WNsE']
)
fig.show()
(update - a more colorfull snapshot)
