-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libpoppler.so.71: cannot open shared object file: No such file or directory #104
Comments
I change the LD_LIBRARY_PATH. It can be imported now,but it does not work |
Hi @xigrug thinks seems to be a problem with a GDAL dependency (conda-forge/osmnx-feedstock#23). Can you try deleting your environment and reinstalling everything? It might have been fixed already. If not, please report back. |
I have the same problem on my end. Fresh install. Here is the output: >>> import gmt
Traceback (most recent call last):
File "/Users/adamprice/anaconda/envs/gmtpy/lib/python3.6/site-packages/gmt/clib/utils.py", line 159, in load_libgmt
libgmt = ctypes.CDLL('.'.join([libname, clib_extension()]))
File "/Users/adamprice/anaconda/envs/gmtpy/lib/python3.6/ctypes/__init__.py", line 348, in __init__
self._handle = _dlopen(self._name, mode)
OSError: dlopen(libgmt.dylib, 6): Library not loaded: @rpath/libpoppler.71.dylib
Referenced from: /Users/adamprice/anaconda/envs/gmtpy/lib/libgdal.20.dylib
Reason: image not found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/adamprice/anaconda/envs/gmtpy/lib/python3.6/site-packages/gmt/__init__.py", line 28, in <module>
_begin()
File "/Users/adamprice/anaconda/envs/gmtpy/lib/python3.6/site-packages/gmt/session_management.py", line 17, in begin
with LibGMT() as lib:
File "/Users/adamprice/anaconda/envs/gmtpy/lib/python3.6/site-packages/gmt/clib/core.py", line 103, in __init__
self._bind_clib_functions(libname)
File "/Users/adamprice/anaconda/envs/gmtpy/lib/python3.6/site-packages/gmt/clib/core.py", line 136, in _bind_clib_functions
self._libgmt = load_libgmt(libname)
File "/Users/adamprice/anaconda/envs/gmtpy/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:
dlopen(libgmt.dylib, 6): Library not loaded: @rpath/libpoppler.71.dylib
Referenced from: /Users/adamprice/anaconda/envs/gmtpy/lib/libgdal.20.dylib
Reason: image not found |
@adamnicholasprice thanks for reporting the issue. Did you follow the instructions in http:https://www.gmtpython.xyz/install.html for installing in a conda environment? If so, could you please post the output of |
Yes I followed the install instructions (even cloned the git on the second time install).
|
@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?
More information about these issues on the conda-forge documentation: https://conda-forge.org/docs/conda-forge_gotchas.html |
@leouieda That did not work for me but I was able to resolve it using the instructions in https://github.com/conda-forge/gdal-feedstock . Looking forward to using the package! |
I'm glad it's working! Would you mind sharing what you did so that we can have it as a reference? Also, did you check if your gdal is now coming from conda-forge? |
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 |
I had the same issue this morning. @adamnicholasprice solution also worked for me. Thanks! |
@btozer thanks for reporting. I'll add these instructions to the documentation. |
Not having conda-forge in the conda config can cause problems with conflicting versions of gdal and other dependencies. This can be fixed by calling `conda config` before doing anything. The added advantage is that we don't need the `-c conda-forge` in every conda command anymore. Fixes #104
Not having conda-forge in the conda config can cause problems with conflicting versions of gdal and other dependencies. This can be fixed by calling `conda config` before doing anything. The added advantage is that we don't need the `-c conda-forge` in every conda command anymore. Fixes #104
I've updated the install instructions to reflect the solution by @adamnicholasprice: http:https://www.gmtpython.xyz/install.html#installing-gmt-and-other-dependencies Could anyone please give it a try to see if it works in machines other than mine? |
Hi, I'm very new to Python and Anaconda and tried to reproduce the mentioned steps, but sadly the error still occur:
The output of my
|
@DennisScuba I've had the same issue as yours and ended up building a new conda env. |
@DennisScuba and @AloshkaD yes, please use a separate environment for now. Also, notice that you have the wrong version of GMT (5.4.3 instead of 6.0.0). |
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 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 :) |
Hi @hammytheham, thanks for the feedback!
Not at all! This has been a major problem from the start and a constant source of headaches for me :) Conda-forge is a relatively new resource and things are still a bit unstable. They have been doing a lot of work to get things better integrated with the default Anaconda. This will hopefully solve a large amount of these issues. I'm constantly tweaking this process but it's really hard to prepare for these errors since I don't get them. Also, I really love to get contributions of this kind! The only way to have a robust set of install instructions is if people with diverse setups contribute to it. Would you like to try adding some words to the instructions? I would really appreciate it if you could help clarify what you found confusing and what eventually cleared things up. You can do that online by going to https://github.com/GenericMappingTools/gmt-python/blob/master/doc/install.rst and clicking in the little pencil icon. |
Done :) |
I was having the same issue. so i opened anaconda navigator and go to the env. then in the channels, you can see default and conda-forge so you can delete conda-forge. then again install gdal, poppler. both will be available on default channel. this works for me |
The text was updated successfully, but these errors were encountered: