GenericMappingTools / pygmt

A Python interface for the Generic Mapping Tools.
https://www.pygmt.org
BSD 3-Clause "New" or "Revised" License
747 stars 216 forks source link

Import PYGMT error #303

Closed dpath2o closed 5 years ago

dpath2o commented 5 years ago

Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/pygmt/clib/loading.py", line 42, in load_libgmt libgmt = ctypes.CDLL(libpath) File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ctypes/init.py", line 356, in init self._handle = _dlopen(self._name, mode) OSError: dlopen(libgmt.dylib, 6): image not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "plots_and_calcs.py", line 5, in import pygmt File "/usr/local/lib/python3.7/site-packages/pygmt/init.py", line 26, in _begin() File "/usr/local/lib/python3.7/site-packages/pygmt/session_management.py", line 17, in begin with Session() as lib: File "/usr/local/lib/python3.7/site-packages/pygmt/clib/session.py", line 173, in enter self.create("gmt-python-session") File "/usr/local/lib/python3.7/site-packages/pygmt/clib/session.py", line 321, in create restype=ctp.c_void_p, File "/usr/local/lib/python3.7/site-packages/pygmt/clib/session.py", line 271, in get_libgmt_func self._libgmt = load_libgmt() File "/usr/local/lib/python3.7/site-packages/pygmt/clib/loading.py", line 51, in load_libgmt raise GMTCLibNotFoundError(msg) pygmt.exceptions.GMTCLibNotFoundError: Error loading the GMT shared library 'libgmt.dylib': dlopen(libgmt.dylib, 6): image not found

Mac OSX (10.14.3) Python 3.7.3 (homebrew install). Works well via system calls GMT 5.4.5 (homebrew install). Works well via system calls.

welcome[bot] commented 5 years ago

👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible. You might also want to take a look at our contributing guidelines and code of conduct.

EJFielding commented 5 years ago

PyGMT requires GMT version 6, which is still in the development version at this time.

leouieda commented 5 years ago

@dpath2o thanks for trying out PyGMT. As @EJFielding pointed out you'll need the latest GMT development version. See https://www.pygmt.org/dev/install.html#which-gmt