Skip to content
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

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

Closed
jlmaurer opened this issue May 10, 2022 · 5 comments
Closed

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

jlmaurer opened this issue May 10, 2022 · 5 comments
Labels
bug Something isn't working upstream Bug or missing feature of upstream core GMT
Milestone

Comments

@jlmaurer
Copy link

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'
@jlmaurer jlmaurer added the bug Something isn't working label May 10, 2022
@welcome
Copy link

welcome bot commented May 10, 2022

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

@weiji14
Copy link
Member

weiji14 commented May 10, 2022

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.

@weiji14
Copy link
Member

weiji14 commented May 10, 2022

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.

@jlmaurer
Copy link
Author

@weiji14 that did the trick! Thanks

@weiji14 weiji14 added the upstream Bug or missing feature of upstream core GMT label May 10, 2022
@seisman seisman added this to the 0.7.0 milestone May 11, 2022
@seisman
Copy link
Member

seisman commented May 11, 2022

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

@seisman seisman closed this as completed May 11, 2022
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

3 participants