I encountered one problem about the use of pygmt in Centos command line. The python3 was installed by the installation of Anaconda3, then in conda environment the following command lines were run:
conda create --name pygmt --channel conda-forge pygmt
conda activate pygmt
It seemed good! but when I inserted import pygmt to the python script and ran it in command line (python3 pythonscript.py), error came up with ModuleNotFoundError: No module named ‘pygmt’. That’s similar when pygmt was just imported in python3 environment.
In addition, another python (version 3.10.5) in anaconda3/envs/pygmt/bin was found, which is different with python 3.9.12 in anaconda3 directory!
Is there any problem for the installation? why is there an independent bin for pygmt? how to import pygmt freely in python3 environment or script? Many thanks.