Hi Weiji14, I am new to use pygmt but I have successfully installed it and launched it using conda. but when I am trying to mimport the pygmt from the jupyter notebook it is showing an error message. thank you
GMTCLibNotFoundError Traceback (most recent call last)
Cell In[1], line 1
----> 1 import pygmt
2 pygmt.show_versions()
4 fig = pygmt.Figure()
File ~\anaconda3\lib\site-packages\pygmt\__init__.py:29
27 __version__ = f'v{version("pygmt")}' # e.g. v0.1.2.dev3+g0ab3cd78
28 __commit__ = __version__.split("+g")[-1] if "+g" in __version__ else "" # 0ab3cd78
---> 29 with clib.Session() as lib:
30 __gmt_version__ = lib.info["version"]
32 # Import modules to make the high-level GMT Python API
File ~\anaconda3\lib\site-packages\pygmt\clib\session.py:217, in Session.__enter__(self)
204 def __enter__(self):
205 """
206 Create a GMT API session and check the libgmt version.
207
(...)
215 raising the exception.
216 """
--> 217 self.create("pygmt-session")
218 # Need to store the version info because 'get_default' won't work after
219 # the session is destroyed.
220 version = self.info["version"]
File ~\anaconda3\lib\site-packages\pygmt\clib\session.py:364, in Session.create(self, name)
361 except GMTCLibNoSessionError:
362 pass
--> 364 c_create_session = self.get_libgmt_func(
365 "GMT_Create_Session",
366 argtypes=[ctp.c_char_p, ctp.c_uint, ctp.c_uint, ctp.c_void_p],
367 restype=ctp.c_void_p,
368 )
370 # Capture the output printed by GMT into this list. Will use it later
371 # to generate error messages for the exceptions raised by API calls.
372 self._error_log = [] # pylint: disable=attribute-defined-outside-init
File ~\anaconda3\lib\site-packages\pygmt\clib\session.py:316, in Session.get_libgmt_func(self, name, argtypes, restype)
279 """
280 Get a ctypes function from the libgmt shared library.
281
(...)
312 <class 'ctypes.CDLL.__init__.<locals>._FuncPtr'>
313 """
314 if not hasattr(self, "_libgmt"):
315 # pylint: disable=attribute-defined-outside-init
--> 316 self._libgmt = load_libgmt()
317 function = getattr(self._libgmt, name)
318 if argtypes is not None:
File ~\anaconda3\lib\site-packages\pygmt\clib\loading.py:59, in load_libgmt(lib_fullnames)
56 failing_libs.append(libname)
58 if error:
---> 59 raise GMTCLibNotFoundError("\n".join(error_msg))
61 return libgmt
GMTCLibNotFoundError: Error loading GMT shared library at 'gmt.dll'.
Could not find module 'gmt.dll' (or one of its dependencies). Try using the full path with constructor syntax.
Error loading GMT shared library at 'gmt_w64.dll'.
Could not find module 'gmt_w64.dll' (or one of its dependencies). Try using the full path with constructor syntax.
Error loading GMT shared library at 'gmt_w32.dll'.
Could not find module 'gmt_w32.dll' (or one of its dependencies). Try using the full path with constructor syntax.
