@andrebelem thanks for sharing the solution. I am new on this, but running the code I got a warning message:
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
So PyGMT couldn’t be installed in my case, should I try in a venv ?
Thanks,
Daniel M Chacón