@@ -29,7 +29,7 @@ To activate the virtual environment, you can do::
29
29
conda activate pygmt
30
30
31
31
After this, check that everything works by running the following in a Python
32
- interpreter (e.g. in a Jupyter notebook)::
32
+ interpreter (e.g., in a Jupyter notebook)::
33
33
34
34
import pygmt
35
35
pygmt.show_versions()
@@ -40,8 +40,8 @@ Start by looking at the tutorials on our sidebar, good luck!
40
40
.. note ::
41
41
42
42
The sections below provide more detailed, step by step instructions to
43
- installing and testing PyGMT for those who may have a slightly different
44
- setup .
43
+ install and test PyGMT for those who may have a slightly different setup or
44
+ want to install the latest development version .
45
45
46
46
Which Python?
47
47
-------------
@@ -51,9 +51,10 @@ work, but there is no guarantee that PyGMT will behave as expected.
51
51
52
52
We recommend using the `Anaconda <https://www.anaconda.com/distribution >`__
53
53
Python distribution to ensure you have all dependencies installed and the
54
- ``conda `` package manager available.
55
- Installing Anaconda does not require administrative rights to your computer and
56
- doesn't interfere with any other Python installations in your system.
54
+ `conda <https://docs.conda.io/projects/conda/en/latest/ >`__
55
+ package manager is available. Installing Anaconda does not require administrative
56
+ rights to your computer and doesn't interfere with any other Python
57
+ installations on your system.
57
58
58
59
59
60
Which GMT?
@@ -110,14 +111,14 @@ Now we can create a new conda environment with Python and all our dependencies
110
111
installed (we'll call it ``pygmt `` but feel free to change it to whatever you
111
112
want)::
112
113
113
- conda create --name pygmt python=3.9 pip numpy pandas xarray netcdf4 packaging gmt
114
+ conda create --name pygmt python=3.9 numpy pandas xarray netcdf4 packaging gmt
114
115
115
116
Activate the environment by running the following (**do not forget this step! **)::
116
117
117
118
conda activate pygmt
118
119
119
120
From now on, all commands will take place inside the conda virtual environment
120
- called ' pygmt' and won't affect your default ' base' installation.
121
+ called `` pygmt `` and won't affect your default `` base `` installation.
121
122
122
123
123
124
Installing PyGMT
@@ -134,6 +135,10 @@ This installs the latest stable release of PyGMT from
134
135
135
136
conda install pygmt
136
137
138
+ This upgrades the installed PyGMT version to be the latest stable release::
139
+
140
+ conda update pygmt
141
+
137
142
Using pip
138
143
~~~~~~~~~
139
144
@@ -147,13 +152,11 @@ Alternatively, you can install the latest development version from
147
152
148
153
pip install --pre --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple pygmt
149
154
150
- or from PyGMT's `GitHub repository <https://github.com/GenericMappingTools/pygmt >`__
151
- (slower as it downloads the whole archive)::
152
-
153
- pip install git+https://github.com/GenericMappingTools/pygmt.git#egg=pygmt
155
+ To upgrade the installed stable release or development version to be the latest
156
+ one, just add ``--upgrade `` to the corresponding command above.
154
157
155
- Any of the above methods (conda/pip) should allow you to use the `` pygmt ``
156
- library from Python.
158
+ Any of the above methods (conda/pip) should allow you to use the PyGMT package
159
+ from Python.
157
160
158
161
159
162
Testing your install
@@ -182,7 +185,8 @@ dependencies as well (be sure to have your conda environment activated)::
182
185
183
186
conda install pytest pytest-mpl ipython
184
187
185
- Test your installation by running the following inside a Python interpreter::
188
+ Test your installation by running the following inside a Python interpreter
189
+ (note that it may take a few minutes)::
186
190
187
191
import pygmt
188
192
pygmt.show_versions()
@@ -193,14 +197,14 @@ Finding the GMT shared library
193
197
------------------------------
194
198
195
199
Sometimes, PyGMT will be unable to find the correct version of the GMT shared
196
- library.
200
+ library (`` libgmt ``) .
197
201
This can happen if you have multiple versions of GMT installed.
198
202
199
203
You can tell PyGMT exactly where to look for ``libgmt `` by setting the
200
204
``GMT_LIBRARY_PATH `` environment variable.
201
205
This should be set to the directory where ``libgmt.so ``, ``libgmt.dylib `` or
202
- ``gmt.dll `` can be found for Linux, macOS and Windows respectively.
203
- e.g. on a command line, run::
206
+ ``gmt.dll `` can be found for Linux, macOS and Windows, respectively.
207
+ e.g., on a command line, run::
204
208
205
209
# Linux/macOS
206
210
export GMT_LIBRARY_PATH=$HOME/anaconda3/envs/pygmt/lib
0 commit comments