Repository navigation
Closed
Description
Hi,
Hope this message finds you well. I developed a teaching module using PyGMT back in February using Google Colab. I used this described solution to import PyGMT and things worked well. It sometimes took running the import cell another time -- some folks got an error upon first run -- but things worked successfully
I am currently preparing to teach this module again and just tried running through the code again. I am now getting the error appended. Do you know what may be causing this error? I didn't find any solutions on the forum and figured I may raise the issue here. Thanks in advance for any guidance.
Best,
Sarah
---------------------------------------------------------------------------
GMTCLibNotFoundError Traceback (most recent call last)
[<ipython-input-2-9b6890099622>](https://localhost:8080/#) in <cell line: 8>()
6 condacolab.install()
7 get_ipython().system('mamba install pygmt')
----> 8 import pygmt
9 from matplotlib import pyplot as plt
10 get_ipython().run_line_magic('matplotlib', 'inline')
4 frames
[/usr/local/lib/python3.10/site-packages/pygmt/clib/loading.py](https://localhost:8080/#) in load_libgmt(lib_fullnames)
57
58 if error:
---> 59 raise GMTCLibNotFoundError("\n".join(error_msg))
60
61 return libgmt
GMTCLibNotFoundError: Error loading GMT shared library at '/usr/local/lib/libgmt.so'.
/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /usr/local/lib/./libgdal.so.32)
Error loading GMT shared library at 'libgmt.so'.
libgmt.so: cannot open shared object file: No such file or directory
Metadata
Metadata
Assignees
Labels
No labels
Activity
seisman commentedon Jun 30, 2023
I just tried the PyGMT demo (https://colab.research.google.com/github/GenericMappingTools/try-gmt/blob/master/python-demo.ipynb) and it works well for me. So it means the solution still works.
seisman commentedon Jun 30, 2023
Maybe you have to run the install commands in a separate cell?
seisman commentedon Jun 30, 2023
Running the above commands in a separate cell works well for me.
weiji14 commentedon Jun 30, 2023
That error looks similar to #37 (comment), and I think is due to out of sync dependencies on conda-forge. Maybe the recent PRs like conda-forge/gmt-feedstock#260 fixed it already?
seisman commentedon Sep 2, 2023
Closing the issue as Google Colab works well for me.