For anyone who reads this post:
Currently, the best and simplest solution is to install conda using condacolab.
- Install conda
!pip install -q condacolab import condacolab condacolab.install()
- Install PyGMT and its depenecies
!mamba install pygmt
Please refer to https://github.com/conda-incubator/condacolab and https://github.com/GenericMappingTools/try-gmt/blob/master/python-demo.ipynb for the detailed instructions.