Skip to content

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

Closed

Description

@yodges

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

Activity

  1. reopened this on Jul 27, 2017
  2. leouieda commented on Jul 27, 2017

    @leouieda
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions