Skip to content

Commit

Permalink
Improve instructions about setting GMT_LIBRARY_PATH env variable (#2136)
Browse files Browse the repository at this point in the history
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
  • Loading branch information
seisman and weiji14 authored Oct 9, 2022
1 parent de984aa commit 47fb480
Showing 1 changed file with 12 additions and 7 deletions.
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)::

# 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\

0 comments on commit 47fb480

Please sign in to comment.