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

Another solution to "Error loading GMT shared library at …" using $DYLD_LIBRARY_PATH environmental variable #3569

Closed
seanricardoford opened this issue Oct 31, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@seanricardoford
Copy link

Description of the problem

In the "Error loading GMT shared library at …" subsection of the Install section of the user documentation, suggest adding another solution to the error:

For Linux/macOS, try adding the following line or lines to your shell configuration file (usually ~/.bashrc for Bash on Linux and ~/.zshrc for Zsh on macOS):

export GMT_LIBRARY_PATH=$HOME/miniforge3/envs/pygmt/lib

or

export LD_LIBRARY_PATH=$GMTHOME/lib:$LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=$GMTHOME/lib:$DYLD_LIBRARY_PATH

Minimal Complete Verifiable Example

No response

Full error message

No response

System information

PyGMT information:
  version: v0.13.0
System information:
  python: 3.12.6 (v3.12.6:a4a2d2b0d85, Sep  6 2024, 16:08:03) [Clang 13.0.0 (clang-1300.0.29.30)]
  executable: /Library/Frameworks/Python.framework/Versions/3.12/bin/python3
  machine: macOS-14.7.1-arm64-arm-64bit
Dependency information:
  numpy: 2.1.1
  pandas: 2.2.3
  xarray: 2024.9.0
  netCDF4: 1.7.1.post2
  packaging: 24.1
  contextily: None
  geopandas: None
  IPython: 8.23.0
  rioxarray: None
  gdal: None
  ghostscript: 10.02.1
GMT library information:
  version: 6.5.0
  padding: 2
  share dir: /Applications/GMT-6.5.0.app/Contents/Resources/share
  plugin dir: /Applications/GMT-6.5.0.app/Contents/Resources/lib/gmt/plugins
  library path: /Applications/GMT-6.5.0.app/Contents/Resources/lib/libgmt.dylib
  cores: 24
  grid layout: rows
  image layout: 
  binary version: 6.5.0
@seanricardoford seanricardoford added the bug Something isn't working label Oct 31, 2024
Copy link

welcome bot commented Oct 31, 2024

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

@yvonnefroehlich yvonnefroehlich added documentation Improvements or additions to documentation and removed bug Something isn't working labels Oct 31, 2024
@seisman
Copy link
Member

seisman commented Oct 31, 2024

Thanks for providing this solution. Changing LD_LIBRARY_PATH (on Linux) or DYLD_LIBRARY_PATH (on macOS) definitely works, but it sometimes may cause system-wide conflicts, especially if other libraries/software depend on them. So, I still prefer the GMT_LIBRARY_PATH solution which can make things safer and more isolated.

@seisman seisman closed this as not planned Won't fix, can't repro, duplicate, stale Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants