I’m Sihan, trying to install pygmt via anaconda according to the instructions from PYGMT web. After installation, I tried to test it but failed with this error:
Hmm, segmentation faults are never fun (or easy to debug). Your versions are pretty much the same as what I have, but missing the “GMT library information” part:
Could you describe a little bit more on how you installed pygmt (e.g. the commands you used), and where is it that you are running pygmt.show_versions()? Is this in a Jupyter notebook, or IPython, or somewhere else?
My guess is there is something wrong with the GMT installation, but need more information to be sure. Could you provide the output of gmt --show-library too please?
many thanks for your reply! Yes, I installed pygmt via anaconda like this on my terminal:
(base) [sihan@localhost excluded_stations]$ conda activate pygmt
(pygmt) [sihan@localhost excluded_stations]$ conda install pygmt
after I successfully installed, I opened the python interpreter also based on terminal:
(base) [sihan@localhost excluded_stations]$ conda activate pygmt
(pygmt) [sihan@localhost excluded_stations]$ python
Python 3.9.2 | packaged by conda-forge | (default, Feb 21 2021, 05:02:46)
[GCC 9.3.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.
import pygmt
pygmt.show_versions()
afterwards, it gave me such previous error at the last: Segmentation fault (core dumped)
I checked my gmt library, the information is here:
[sihan@localhost excluded_stations]$ gmt --show-library /opt/GMT-6.1.1/lib64/libgmt.so
Hmm, could you provide the output of conda list? I don’t see why gmt --show-library is pointing to /opt/GMT-6.1.1 instead of your conda environment (e.g. /home/sihan/anaconda3/envs/pygmt/....