Skip to content

Commit eef7358

Browse files
Update Julia installation
1 parent d169845 commit eef7358

File tree

1 file changed

+42
-70
lines changed

1 file changed

+42
-70
lines changed

_episodes/02-installation.md

Lines changed: 42 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,42 @@ To install mamba on ``Linux`` or ``MacOSX``, follow the instructions below:
100100
For more information about installing mamba,
101101
see [the mamba installation documentation](https://docs.esmvaltool.org/en/latest/quickstart/installation.html#mamba-installation).
102102

103+
### Install the ESMValTool package
104+
105+
The ESMValTool package contains diagnostics scripts in four languages: R,
106+
Python, Julia and NCL. This introduces a lot of dependencies, and therefore the
107+
installation can take quite long. It is, however, possible to install
108+
'subpackages' for each of the languages. The following (sub)packages are
109+
available:
110+
111+
- `esmvaltool-python`
112+
- `esmvaltool-ncl`
113+
- `esmvaltool-r`
114+
- `esmvaltool` --> the complete package, i.e. the combination of the above.
115+
116+
For the tutorial, we will install the complete package. Thus, to install the
117+
ESMValTool package, run
118+
119+
```bash
120+
mamba create --name esmvaltool esmvaltool 'python=3.10'
121+
```
122+
123+
On MacOSX ESMValTool functionalities in Julia, NCL, and R are not supported. To install
124+
a Mamba environment on MacOSX, please refer to specific [information](https://docs.esmvaltool.org/en/latest/quickstart/installation.html#installation-on-macosx).
125+
126+
This will create a new [Mamba
127+
environment](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html)
128+
called `esmvaltool`, with the ESMValTool package and all of its dependencies
129+
installed in it.
130+
131+
132+
> ## Common issues
133+
>
134+
> You find a list of common installation problems and their solutions in the
135+
> [documentation](https://docs.esmvaltool.org/en/latest/quickstart/installation.html#common-installation-problems-and-their-solutions).
136+
>
137+
{: .callout}
138+
103139
### Install Julia
104140

105141
Some ESMValTool diagnostics are written in the Julia programming language.
@@ -113,46 +149,18 @@ installation page](https://julialang.org/downloads/platform/#linux_and_freebsd).
113149

114150
> ## Julia installation instructions
115151
>
116-
> First, open a bash terminal and create a directory to install Julia in and cd
117-
> into it
118-
>
119-
> ```bash
120-
> mkdir ~/julia
121-
> cd ~/julia
122-
> ```
123-
>
124-
> Next, to download and extract the file `julia-1.0.5-linux-x86_64.tar.gz`, you can use the following commands::
125-
>
126-
> ```bash
127-
> wget https://julialang-s3.julialang.org/bin/linux/x64/1.0/julia-1.0.5-linux-x86_64.tar.gz
128-
> tar -xvzf julia-1.0.5-linux-x86\_64.tar.gz
129-
> ```
130-
>
131-
> This will extract the files to a directory named `~/julia/julia-1.0.5`. To run
132-
> Julia, you need to add the full path of Julia's `bin` folder to PATH environment
133-
> variable. To do this, you can edit the `~/.bashrc` (or `~/.bash_profile`) file.
134-
> Open the file in a text editor called ``nano``:
135-
>
136-
> ```bash
137-
> nano ~/.bashrc
138-
> ```
139-
>
140-
> and add a new line as follows at the
141-
> bottom of the file:
152+
> First, open a bash terminal and activate the newly created `esmvaltool` environment.
142153
>
143154
> ```bash
144-
> export PATH="$PATH:$HOME/julia/julia-1.0.5/bin"
155+
> conda activate esmvaltool
145156
> ```
146157
>
147-
> Finally, for the settings to take effect, either reload your bash profile
158+
> Next, to install Julia via `mamba`, you can use the following command:
148159
>
149160
> ```bash
150-
> source ~/.bashrc
161+
> mamba install julia
151162
> ```
152-
>
153-
> (or `source ~/.bash_profile`), or close the bash terminal window and open a new
154-
> one.
155-
>
163+
>
156164
> To check that the Julia executable can be found, run
157165
>
158166
> ```bash
@@ -162,7 +170,7 @@ installation page](https://julialang.org/downloads/platform/#linux_and_freebsd).
162170
> to display the path to the Julia executable, it should be
163171
>
164172
> ```
165-
> ~/julia/julia-1.0.5/bin/julia
173+
> ~/mambaforge/envs/esmvaltool/bin/julia
166174
> ```
167175
> {: .output}
168176
>
@@ -175,42 +183,6 @@ installation page](https://julialang.org/downloads/platform/#linux_and_freebsd).
175183
> to start the interactive Julia interpreter. Press `Ctrl+D` to exit.
176184
{: .solution}
177185

178-
### Install the ESMValTool package
179-
180-
The ESMValTool package contains diagnostics scripts in four languages: R,
181-
Python, Julia and NCL. This introduces a lot of dependencies, and therefore the
182-
installation can take quite long. It is, however, possible to install
183-
'subpackages' for each of the languages. The following (sub)packages are
184-
available:
185-
186-
- `esmvaltool-python`
187-
- `esmvaltool-ncl`
188-
- `esmvaltool-r`
189-
- `esmvaltool` --> the complete package, i.e. the combination of the above.
190-
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 esmvaltool 'python=3.10'
196-
```
197-
198-
On MacOSX ESMValTool functionalities in Julia, NCL, and R are not supported. To install
199-
a Mamba environment on MacOSX, please refer to specific [information](https://docs.esmvaltool.org/en/latest/quickstart/installation.html#installation-on-macosx).
200-
201-
This will create a new [Mamba
202-
environment](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html)
203-
called `esmvaltool`, with the ESMValTool package and all of its dependencies
204-
installed in it.
205-
206-
207-
> ## Common issues
208-
>
209-
> You find a list of common installation problems and their solutions in the
210-
> [documentation](https://docs.esmvaltool.org/en/latest/quickstart/installation.html#common-installation-problems-and-their-solutions).
211-
>
212-
{: .callout}
213-
214186
### Test that the installation was successful
215187

216188
To test that the installation was successful, run

0 commit comments

Comments
 (0)