Skip to content

Problem installing on MacOS #722

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

Closed
labrosse opened this issue Dec 9, 2020 · 3 comments
Closed

Problem installing on MacOS #722

labrosse opened this issue Dec 9, 2020 · 3 comments
Labels
bug Something isn't working upstream Bug or missing feature of upstream core GMT

Comments

@labrosse
Copy link

labrosse commented Dec 9, 2020

Description of the problem

Fresh install of GMT using the bundle for MacOS (my system is Catalina, 10.15.7). Successfully tested on a simple example.
Environnement variables set:
echo $GMTHOME
/Applications/GMT-6.1.1.app/Contents/Resources
echo $GMT_LIBRARY_PATH
/Applications/GMT-6.1.1.app/Contents/Resources/lib

pygmt installed using pip (not conda) in a python3 venv.
python3 --version
Python 3.8.3

Full code that generated the error

import pygmt
pygmt.show_versions()
pygmt.test()

Full error message

Traceback (most recent call last):
  File "test2.py", line 1, in <module>
    import pygmt
  File "/Users/stephane/Tools/PyEnvs/GMT/lib/python3.8/site-packages/pygmt/__init__.py", line 32, in <module>
    _begin()
  File "/Users/stephane/Tools/PyEnvs/GMT/lib/python3.8/site-packages/pygmt/session_management.py", line 16, in begin
    with Session() as lib:
  File "/Users/stephane/Tools/PyEnvs/GMT/lib/python3.8/site-packages/pygmt/clib/session.py", line 183, in __enter__
    self.create("pygmt-session")
  File "/Users/stephane/Tools/PyEnvs/GMT/lib/python3.8/site-packages/pygmt/clib/session.py", line 333, in create
    c_create_session = self.get_libgmt_func(
  File "/Users/stephane/Tools/PyEnvs/GMT/lib/python3.8/site-packages/pygmt/clib/session.py", line 284, in get_libgmt_func
    self._libgmt = load_libgmt()
  File "/Users/stephane/Tools/PyEnvs/GMT/lib/python3.8/site-packages/pygmt/clib/loading.py", line 46, in load_libgmt
    raise GMTCLibNotFoundError(
pygmt.exceptions.GMTCLibNotFoundError: Error loading the GMT shared library '/Applications/GMT-6.1.1.app/Contents/Resources/lib/libgmt.dylib':

System information

Please paste the output of python -c "import pygmt; pygmt.show_versions()":

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/stephane/Tools/PyEnvs/GMT/lib/python3.8/site-packages/pygmt/__init__.py", line 32, in <module>
    _begin()
  File "/Users/stephane/Tools/PyEnvs/GMT/lib/python3.8/site-packages/pygmt/session_management.py", line 16, in begin
    with Session() as lib:
  File "/Users/stephane/Tools/PyEnvs/GMT/lib/python3.8/site-packages/pygmt/clib/session.py", line 183, in __enter__
    self.create("pygmt-session")
  File "/Users/stephane/Tools/PyEnvs/GMT/lib/python3.8/site-packages/pygmt/clib/session.py", line 333, in create
    c_create_session = self.get_libgmt_func(
  File "/Users/stephane/Tools/PyEnvs/GMT/lib/python3.8/site-packages/pygmt/clib/session.py", line 284, in get_libgmt_func
    self._libgmt = load_libgmt()
  File "/Users/stephane/Tools/PyEnvs/GMT/lib/python3.8/site-packages/pygmt/clib/loading.py", line 46, in load_libgmt
    raise GMTCLibNotFoundError(
pygmt.exceptions.GMTCLibNotFoundError: Error loading the GMT shared library '/Applications/GMT-6.1.1.app/Contents/Resources/lib/libgmt.dylib':
@welcome
Copy link

welcome bot commented Dec 9, 2020

👋 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.

@seisman
Copy link
Member

seisman commented Dec 9, 2020

Yes, it's a known issue of the GMT macOS bundle. Please see GenericMappingTools/gmt#1930 for discussions.

We recommend you to install pygmt and gmt using conda. If you still prefer to use the macOS bundle, you may try the "solution" in this comment GenericMappingTools/gmt#1930 (comment).

@seisman seisman added bug Something isn't working upstream Bug or missing feature of upstream core GMT labels Dec 9, 2020
@seisman
Copy link
Member

seisman commented Dec 25, 2020

Closing the issue as it's a duplicate of upstream bug GenericMappingTools/gmt#1930

@seisman seisman closed this as completed Dec 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream Bug or missing feature of upstream core GMT
Projects
None yet
Development

No branches or pull requests

2 participants