Skip to content

Error loading GMT shared library at 'libgmt.dylib' #1923

Closed

Description

@jlmaurer

Description of the problem

Problem with one of the GMT libraries on a fresh install of pygmt in a new conda env.

conda create --name pygmt_test
conda activate pygmt_test
mamba install --channel conda-forge pygmt
python
import pygmt

Full error message

>>> import pygmt
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/jeremym/miniconda3/envs/pygmt_test/lib/python3.10/site-packages/pygmt/__init__.py", line 71, in <module>
    _begin()
  File "/Users/jeremym/miniconda3/envs/pygmt_test/lib/python3.10/site-packages/pygmt/session_management.py", line 16, in begin
    with Session() as lib:
  File "/Users/jeremym/miniconda3/envs/pygmt_test/lib/python3.10/site-packages/pygmt/clib/session.py", line 183, in __enter__
    self.create("pygmt-session")
  File "/Users/jeremym/miniconda3/envs/pygmt_test/lib/python3.10/site-packages/pygmt/clib/session.py", line 330, in create
    c_create_session = self.get_libgmt_func(
  File "/Users/jeremym/miniconda3/envs/pygmt_test/lib/python3.10/site-packages/pygmt/clib/session.py", line 282, in get_libgmt_func
    self._libgmt = load_libgmt()
  File "/Users/jeremym/miniconda3/envs/pygmt_test/lib/python3.10/site-packages/pygmt/clib/loading.py", line 59, in load_libgmt
    raise GMTCLibNotFoundError("\n".join(error_msg))
pygmt.exceptions.GMTCLibNotFoundError: Error loading GMT shared library at '/Users/jeremym/miniconda3/envs/pygmt_test/lib/libgmt.dylib'.
dlopen(/Users/jeremym/miniconda3/envs/pygmt_test/lib/libgmt.dylib, 0x0006): Symbol not found: _ZSTD_compressBound
  Referenced from: /Users/jeremym/miniconda3/envs/pygmt_test/lib/libgdal.30.dylib
  Expected in: /Users/jeremym/miniconda3/envs/pygmt_test/lib/libblosc.1.21.1.dylib
Error loading GMT shared library at 'libgmt.dylib'.
dlopen(libgmt.dylib, 0x0006): Symbol not found: _ZSTD_compressBound
  Referenced from: /Users/jeremym/miniconda3/envs/pygmt_test/lib/libgdal.30.dylib
  Expected in: /Users/jeremym/miniconda3/envs/pygmt_test/lib/libblosc.1.21.1.dylib

System information
This command: python -c "import pygmt; pygmt.show_versions()" doesn't work due to the above error. sys.version_info gives the following:

sys.version_info(major=3, minor=10, micro=4, releaselevel='final', serial=0)

and platform.platform() gives:

'macOS-12.3.1-x86_64-i386-64bit'

Activity

  1. added
    bug
    on May 10, 2022
  2. welcome commented on May 10, 2022

    @welcome

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

  3. weiji14 commented on May 10, 2022

    @weiji14
    Member

    Hi @jlmaurer, thanks for the bug report. We're aware of the issue, and it seems to be a problem on conda-forge due to blosc (which gdal depends on) no longer packaging ZSTD, see conda-forge/blosc-feedstock#53 (comment). Hopefully this will get sorted out in the next day or so.

  4. weiji14 commented on May 10, 2022

    @weiji14
    Member

    As a workaround, could you try mamba install --channel conda-forge pygmt blosc=1.21.0 and see if it works? Sorry that I can't test this, don't have a mac with me.

  5. jlmaurer commented on May 10, 2022

    @jlmaurer
    Author

    @weiji14 that did the trick! Thanks

  6. added
    upstream
    on May 10, 2022
  7. added this to the 0.7.0 milestone on May 11, 2022
  8. seisman commented on May 11, 2022

    @seisman
    Member

    The macOS CI works again. I think the upstream issue has been fixed.

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

    bugupstream

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions