Skip to content

Commit b6bf438

Browse files
authored
Merge pull request #223 from ESMValGroup/update_to_mamba
Update installation to mamba
2 parents 5258048 + 65701cf commit b6bf438

File tree

1 file changed

+48
-63
lines changed

1 file changed

+48
-63
lines changed

_episodes/02-installation.md

Lines changed: 48 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ keypoints:
1717

1818
The instructions help with the installation of ESMValTool on operating systems
1919
like Linux/MacOSX/Windows.
20-
We use the [Conda](https://conda.io/projects/conda/en/latest/index.html)
20+
We use the [Mamba](https://mamba.readthedocs.io/en/latest/index.html)
2121
package manager to
2222
install the ESMValTool. Other installation methods are also available; they can
2323
be found in the
2424
[documentation](https://docs.esmvaltool.org/en/latest/quickstart/installation.html).
25-
We will first install Conda, and then ESMValTool. We end this chapter by testing
25+
We will first install Mamba, and then ESMValTool. We end this chapter by testing
2626
that the installation was successful.
2727

2828
Before we begin, here are all the possible ways in which you can use ESMValTool
29-
depending on your level of expertise or involvement with ESMvalTool and
30-
associated software such as GitHub and Conda.
29+
depending on your level of expertise or involvement with ESMValTool and
30+
associated software such as GitHub and Mamba.
3131

3232
1. If you have access to a server where ESMValTool is already installed
3333
as a module, for e.g., the [CEDA JASMIN](https://help.jasmin.ac.uk/article/4955-community-software-esmvaltool)
@@ -57,59 +57,49 @@ in the [documentation](https://docs.esmvaltool.org/en/latest/quickstart/installa
5757

5858
## Install ESMValTool on Linux/MacOSX
5959

60-
### Install Conda
60+
### Install Mamba
6161

62-
ESMValTool is distributed using [Conda](https://conda.io/).
63-
Let's check if we already have Conda installed by running:
62+
ESMValTool is distributed using [Mamba](https://mamba.readthedocs.io/en/latest/index.html).
63+
To install mamba on ``Linux`` or ``MacOSX``, follow the instructions below:
6464

65-
```bash
66-
conda list
67-
```
68-
69-
If conda is installed, we will see a list of packages.
70-
We recommend updating conda before esmvaltool installation. To do so, run:
71-
72-
```bash
73-
conda update -n base conda
74-
```
75-
76-
If conda is **not** installed, we can use Miniconda minimal installer for conda.
77-
We recommend a Python 3 based installer. For more information about installing conda,
78-
see [the conda installation documentation](https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html).
79-
80-
To install conda on ``Linux`` or ``MacOSX``, follow the instructions below:
81-
82-
1. Please download Miniconda3 at [the miniconda
83-
page](https://docs.conda.io/en/latest/miniconda.html).
84-
If you have problems with the 64 bit version in the next step(s)
85-
you can alternatively try a 32 bit version.
65+
1. Please download the installation file for the latest Mamba version [here](https://github.com/conda-forge/miniforge#mambaforge).
8666

8767
2. Next, run the installer from the place where you downloaded it:
8868

8969
On ``Linux``:
9070

9171
```bash
92-
bash Miniconda3-latest-Linux-x86_64.sh
72+
bash Mambaforge-Linux-x86_64.sh
9373
```
9474

9575
On ``MacOSX``:
9676

9777
```bash
98-
bash Miniconda3-latest-MacOSX-x86_64.sh
78+
bash Mambaforge-MacOSX-x86_64.sh
9979
```
10080

10181
3. Follow the instructions in the installer. The defaults should normally
10282
suffice.
10383

10484
4. You will need to restart your terminal for the changes to have effect.
10585

106-
5. Verify you have a working conda installation by listing all installed
107-
packages
86+
5. We recommend updating mamba before the esmvaltool installation. To do so, run:
10887

10988
```bash
110-
conda list
89+
mamba update --name base mamba
11190
```
11291

92+
6. Verify you have a working mamba installation by:
93+
94+
```bash
95+
which mamba
96+
```
97+
98+
This should show the path to your mamba executeable, e.g. `~/mambaforge/bin/mamba`.
99+
100+
For more information about installing mamba,
101+
see [the mamba installation documentation](https://docs.esmvaltool.org/en/latest/quickstart/installation.html#mamba-installation).
102+
113103
### Install Julia
114104

115105
Some ESMValTool diagnostics are written in the Julia programming language.
@@ -196,44 +186,39 @@ available:
196186
- `esmvaltool-python`
197187
- `esmvaltool-ncl`
198188
- `esmvaltool-r`
199-
- `esmvaltool-julia`
200189
- `esmvaltool` --> the complete package, i.e. the combination of the above.
201190
202-
For the tutorial, we will use only Python diagnostics. Thus, to install the
203-
ESMValTool-python package, run
191+
For the tutorial, we will install the complete package. Thus, to install the
192+
ESMValTool package, run
193+
194+
```bash
195+
mamba create --name esmvaltool 'python=3.9'
196+
```
197+
198+
Next, we install many of the required dependencies, including the ESMValCore package
199+
and Python, R, and NCL interpreters, into this environment by running:
200+
201+
```bash
202+
mamba env update --name esmvaltool --file environment.yml
203+
```
204+
205+
On MacOSX ESMValTool functionalities in Julia, NCL, and R are not supported. To install
206+
a Mamba environment on MacOSX, use the dedicated environment file:
204207
205208
```bash
206-
conda create -n esmvaltool -c conda-forge -c esmvalgroup esmvaltool-python
209+
mamba env create --name esmvaltool --file environment_osx.yml
207210
```
208211
209-
This will create a new [Conda
212+
This will create a new [Mamba
210213
environment](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html)
211-
called `esmvaltool`, with the ESMValTool-Python package and all of its dependencies
214+
called `esmvaltool`, with the ESMValTool package and all of its dependencies
212215
installed in it.
213216
214217
215218
> ## Common issues
216219
>
217-
> - Installation takes a long time
218-
> - Downloads and compilations can take several minutes to complete,
219-
> please be patient.
220-
> - You might have bad luck and the dependencies can not be resolved at
221-
> the moment, please try again later or [raise an
222-
> issue](https://github.com/ESMValGroup/ESMValTool/issues/new/choose)
223-
> - If `Solving environment` takes more than 10 minutes, you may need to update
224-
> conda: `conda update -n base conda`
225-
> - You can help conda solve the environment by specifying
226-
> the python version:
227-
> ```bash
228-
> conda create -n esmvaltool -c conda-forge -c esmvalgroup esmvaltool-python python=3.8
229-
> ```
230-
> - Note that on ``MacOSX``, ``esmvaltool-python`` and
231-
> ``esmvaltool-ncl`` only work with Python 3.7. Use `python=3.7` instead of `python=3.8`.
232-
> - If you have an old conda installation you could get a `UnsatisfiableError`
233-
> message. Please install a newer version of conda and try again
234-
> - Downloads fail due to company proxy, see [conda
235-
> docs](https://docs.anaconda.com/anaconda/user-guide/tasks/proxy/) how to
236-
> resolve.
220+
> You find a list of common installation problems and their solutions in the
221+
> [documentation](https://docs.esmvaltool.org/en/latest/quickstart/installation.html#common-installation-problems-and-their-solutions).
237222
>
238223
{: .callout}
239224
@@ -266,15 +251,15 @@ to display the command line help.
266251
> > The `esmvaltool --help` command lists `version` as a
267252
> > command to get the version
268253
> >
269-
> > In my case when I run
254+
> > When you run
270255
> > ~~~
271256
> > esmvaltool version
272257
> > ~~~
273258
> > {: .bash}
274-
> > I get that my installed ESMValTool version is
259+
> > The version of ESMValTool installed should be displayed on the screen as:
275260
> > ~~~
276-
> > ESMValCore: 2.0.0
277-
> > ESMValTool: 2.0.0
261+
> > ESMValCore: 2.4.0
262+
> > ESMValTool: 2.4.0
278263
> > ~~~
279264
> > {: .output}
280265
> {: .solution}

0 commit comments

Comments
 (0)