@@ -8,14 +8,43 @@ Quickstart
8
8
9
9
The fastest way to install PyGMT is with the
10
10
`conda <https://docs.conda.io/projects/conda/en/latest/user-guide/index.html >`__
11
+ or `mamba <https://mamba.readthedocs.io/en/latest/ >`__
11
12
package manager which takes care of setting up a virtual environment, as well
12
- as the installation of GMT and all the dependencies PyGMT depends on::
13
+ as the installation of GMT and all the dependencies PyGMT depends on:
13
14
14
- conda create --name pygmt --channel conda-forge pygmt
15
+ .. tab-set ::
15
16
16
- To activate the virtual environment, you can do::
17
+ .. tab-item :: conda
18
+ :sync: conda
17
19
18
- conda activate pygmt
20
+ ::
21
+
22
+ conda create --name pygmt --channel conda-forge pygmt
23
+
24
+ .. tab-item :: mamba
25
+ :sync: mamba
26
+
27
+ ::
28
+
29
+ mamba create --name pygmt --channel conda-forge pygmt
30
+
31
+ To activate the virtual environment, you can do:
32
+
33
+ .. tab-set ::
34
+
35
+ .. tab-item :: conda
36
+ :sync: conda
37
+
38
+ ::
39
+
40
+ conda activate pygmt
41
+
42
+ .. tab-item :: mamba
43
+ :sync: mamba
44
+
45
+ ::
46
+
47
+ mamba activate pygmt
19
48
20
49
After this, check that everything works by running the following in a Python
21
50
interpreter (e.g., in a Jupyter notebook)::
@@ -96,13 +125,41 @@ First, we must configure conda to get packages from the
96
125
97
126
Now we can create a new conda environment with Python and all our dependencies
98
127
installed (we'll call it ``pygmt `` but feel free to change it to whatever you
99
- want)::
128
+ want):
129
+
130
+ .. tab-set ::
131
+
132
+ .. tab-item :: conda
133
+ :sync: conda
134
+
135
+ ::
136
+
137
+ conda create --name pygmt python=3.9 numpy pandas xarray netcdf4 packaging gmt
138
+
139
+ .. tab-item :: mamba
140
+ :sync: mamba
141
+
142
+ ::
100
143
101
- conda create --name pygmt python=3.9 numpy pandas xarray netcdf4 packaging gmt
144
+ mamba create --name pygmt python=3.9 numpy pandas xarray netcdf4 packaging gmt
102
145
103
- Activate the environment by running the following (**do not forget this step! **)::
146
+ Activate the environment by running the following (**do not forget this step! **):
104
147
105
- conda activate pygmt
148
+ .. tab-set ::
149
+
150
+ .. tab-item :: conda
151
+ :sync: conda
152
+
153
+ ::
154
+
155
+ conda activate pygmt
156
+
157
+ .. tab-item :: mamba
158
+ :sync: mamba
159
+
160
+ ::
161
+
162
+ mamba activate pygmt
106
163
107
164
From now on, all commands will take place inside the conda virtual environment
108
165
called ``pygmt `` and won't affect your default ``base `` installation.
@@ -114,17 +171,45 @@ Installing PyGMT
114
171
Now that you have GMT installed and your conda virtual environment activated,
115
172
you can install PyGMT using any of the following methods:
116
173
117
- Using conda (recommended)
118
- ~~~~~~~~~~~~~~~~~~~~~~~~~
174
+ Using conda/mamba (recommended)
175
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
119
176
120
177
This installs the latest stable release of PyGMT from
121
- `conda-forge <https://anaconda.org/conda-forge/pygmt >`__::
178
+ `conda-forge <https://anaconda.org/conda-forge/pygmt >`__:
179
+
180
+ .. tab-set ::
181
+
182
+ .. tab-item :: conda
183
+ :sync: conda
184
+
185
+ ::
186
+
187
+ conda install pygmt
188
+
189
+ .. tab-item :: mamba
190
+ :sync: mamba
191
+
192
+ ::
193
+
194
+ mamba install pygmt
195
+
196
+ This upgrades the installed PyGMT version to be the latest stable release:
197
+
198
+ .. tab-set ::
199
+
200
+ .. tab-item :: conda
201
+ :sync: conda
202
+
203
+ ::
204
+
205
+ conda update pygmt
122
206
123
- conda install pygmt
207
+ .. tab-item :: mamba
208
+ :sync: mamba
124
209
125
- This upgrades the installed PyGMT version to be the latest stable release ::
210
+ ::
126
211
127
- conda update pygmt
212
+ mamba update pygmt
128
213
129
214
Using pip
130
215
~~~~~~~~~
0 commit comments