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

Improve instructions about setting GMT_LIBRARY_PATH env variable #2136

Merged
merged 4 commits into from
Oct 9, 2022
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions doc/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,17 @@ library (``libgmt``).
This can happen if you have multiple versions of GMT installed.

You can tell PyGMT exactly where to look for ``libgmt`` by setting the
``GMT_LIBRARY_PATH`` environment variable.
This should be set to the directory where ``libgmt.so``, ``libgmt.dylib`` or
``gmt.dll`` can be found for Linux, macOS and Windows, respectively.
e.g., on a command line, run::
``GMT_LIBRARY_PATH`` environment variable to the directory where ``libgmt.so``,
``libgmt.dylib`` or ``gmt.dll`` can be found on Linux, macOS or Windows,
respectively.

For Linux/macOS, add the following line to your shell configuration file
(usually `~/.bashrc` for Bash on Linux and `~/.zshrc` for Zsh on macOS)::
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use the tab thing for Linux/macOS/Windows instructions? Similar to what is currently used for conda/mamba?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's necessary.

seisman marked this conversation as resolved.
Show resolved Hide resolved

# Linux/macOS
export GMT_LIBRARY_PATH=$HOME/anaconda3/envs/pygmt/lib
# Windows
set "GMT_LIBRARY_PATH=C:\Users\USERNAME\Anaconda3\envs\pygmt\Library\bin\"

For Windows, add the ``GMT_LIBRARY_PATH`` environment variable following these
`instructions <https://www.wikihow.com/Create-an-Environment-Variable-in-Windows-10>`__
and set its value to a path like::

C:\Users\USERNAME\Anaconda3\envs\pygmt\Library\bin\