>>> import gmt
Traceback (most recent call last):
File "/users1j/cliu/soft/anaconda2/envs/gmt-python/lib/python3.6/site-packages/gmt/clib/utils.py", line 159, in load_libgmt
libgmt = ctypes.CDLL('.'.join([libname, clib_extension()]))
File "/users1j/cliu/soft/anaconda2/envs/gmt-python/lib/python3.6/ctypes/__init__.py", line 348, in __init__
self._handle = _dlopen(self._name, mode)
OSError: libpoppler.so.71: cannot open shared object file: No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/users1j/cliu/soft/anaconda2/envs/gmt-python/lib/python3.6/site-packages/gmt/__init__.py", line 27, in <module>
_begin()
File "/users1j/cliu/soft/anaconda2/envs/gmt-python/lib/python3.6/site-packages/gmt/session_management.py", line 17, in begin
with LibGMT() as lib:
File "/users1j/cliu/soft/anaconda2/envs/gmt-python/lib/python3.6/site-packages/gmt/clib/core.py", line 103, in __init__
self._bind_clib_functions(libname)
File "/users1j/cliu/soft/anaconda2/envs/gmt-python/lib/python3.6/site-packages/gmt/clib/core.py", line 136, in _bind_clib_functions
self._libgmt = load_libgmt(libname)
File "/users1j/cliu/soft/anaconda2/envs/gmt-python/lib/python3.6/site-packages/gmt/clib/utils.py", line 168, in load_libgmt
raise GMTCLibNotFoundError(msg)
gmt.exceptions.GMTCLibNotFoundError: Couldn't find the GMT shared library 'libgmt'. Have you tried setting the LD_LIBRARY_PATH environment variable?
Original error message:
libpoppler.so.71: cannot open shared object file: No such file or directory
This is the line of syntax seemed to have fixed by issue.
After which run the
command to make sure packages are coming from conda-forge
@adamnicholasprice thanks! I think I see a problem. Your gdal isn’t coming from conda-forge for some reason but poppler is. That might be causing the linking issue. Could you try the following please?
.condarcfile in your home directory to include this (it will make conda-forge a priority):conda listto see ifgdalis coming from theconda-forgechannel and report back.More information about these issues on the conda-forge documentation: https://conda-forge.org/docs/conda-forge_gotchas.html
I know this is closed but…I had a lot of problem recently with these issues. gmt would switch down to 5.4 when trying to work the conda-forge feedstock, having errors like @rpath/libpoppler.76.dylib Referenced from: /anaconda3/envs/gmt-python/lib/libgdal.20.dylib.
I checked my conda list and gdal was from the conda feedstock. But libgdal wasnt. So…
conda install -c conda-forge libgdal
This worked.
Great program - Only thing with the install instructions I would say may help is to link/integrate the install instructions to the feedstock instructions a little more. Just a bit of friendly feedback - feel free to ignore if Im being an idiot! I got a little confused - thanks 😃
@DennisScuba I’ve had the same issue as yours and ended up building a new conda env.
@adamnicholasprice thanks for reporting the issue.
Did you follow the instructions in http://www.gmtpython.xyz/install.html for installing in a conda environment? If so, could you please post the output of
conda list?