Skip to content
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

OSError Install issue: won't open the gmt library, image not found #29

Closed
yodges opened this issue Jul 27, 2017 · 1 comment
Closed

Comments

@yodges
Copy link

yodges commented Jul 27, 2017

Using Mac os x sierra and the latest version of conda I followed everything on the installation page
https://genericmappingtools.github.io/gmt-python/install.html including setting LD_LIBRARY_PATH in .bashrc to my anaconda library and get this error

Python 3.6.2 |Anaconda custom (x86_64)| (default, Jul 20 2017, 13:14:59) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import gmt
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/XXXX/anaconda3/lib/python3.6/site-packages/gmt/__init__.py", line 18, in <module>
    _begin()
  File "/Users/XXXX/anaconda3/lib/python3.6/site-packages/gmt/session_management.py", line 20, in begin
    with APISession() as session:
  File "/Users/XXXX/anaconda3/lib/python3.6/site-packages/gmt/clib/core.py", line 205, in __enter__
    self.session_id = create_session()
  File "/Users/XXXX/anaconda3/lib/python3.6/site-packages/gmt/clib/core.py", line 135, in create_session
    libgmt = load_libgmt()
  File "/Users/XXXX/anaconda3/lib/python3.6/site-packages/gmt/clib/core.py", line 32, in load_libgmt
    libgmt = ctypes.CDLL('.'.join(['libgmt', lib_ext]))
  File "/Users/XXXX/anaconda3/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/libicui18n.58.dylib
  Referenced from: /Users/XXXX/anaconda3/lib/libgdal.20.dylib
  Reason: image not found

Here's what my .bashrc looks like

PS1="\w ";
export PS1

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/anaconda3/lib

Also I have conda-forge set as the priority conda channel in .condarc. According to this https://conda-forge.org/docs/conda-forge_gotchas.html conda forge uses icu 56. In the error however my system is trying to use icu 58? I'm not sure what I am missing, any help?

**edit: when I created a new conda environment and recreated all the steps, it works. ALSO, i had to reinstall jupyter and nb_conda in this environment in order to get it working in a notebook

@yodges yodges closed this as completed Jul 27, 2017
@yodges yodges reopened this Jul 27, 2017
@yodges yodges closed this as completed Jul 27, 2017
@leouieda
Copy link
Member

@yodges that was a problem with the GMT alpha build. I detected this in my CI builds and fixed it. That's why when you reinstalled it worked. You were getting a broken version of GMT itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants