|
5 | 5 |
|
6 | 6 | ## Run the tutorial on your computer
|
7 | 7 |
|
8 |
| -To run the tutorial locally, setup the environment with [conda](https://docs.conda.io/en/latest/miniconda.html) (or [mamba](https://mamba.readthedocs.io/en/latest/installation.html)): |
| 8 | +### 0. Prerequisites |
| 9 | + |
| 10 | +To run the tutorial locally, you should first install [conda](https://docs.conda.io/en/latest/miniconda.html) (or [mamba](https://mamba.readthedocs.io/en/latest/installation.html)). |
| 11 | + |
| 12 | +It is also suggested that you have a recent version of `git`. Check out [how to install `git`](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) on your operating system. |
| 13 | + |
| 14 | +### 1. Download the material |
| 15 | + |
| 16 | +Go to the directory on your machine where you want to download the material and clone the repository: |
| 17 | + |
| 18 | +```console |
| 19 | +git clone https://github.com/empa-scientific-it/python-tutorial |
| 20 | +``` |
| 21 | + |
| 22 | +Alternatively, you can manually download a ZIP archive with the latest version of the material: |
| 23 | + |
| 24 | +[Download ZIP archive](https://github.com/empa-scientific-it/python-tutorial/archive/refs/heads/main.zip) |
| 25 | + |
| 26 | +Extract the archive in a directory of your choice. |
| 27 | + |
| 28 | +### 2. Create a dedicated environment |
| 29 | + |
| 30 | +Enter the tutorial folder with |
9 | 31 |
|
10 | 32 | ```console
|
11 |
| -conda env create -f environment.yml |
| 33 | +cd /path/to/python-tutorial |
| 34 | + |
| 35 | +``` |
| 36 | + |
| 37 | +You should now create a new environment with `conda`: |
| 38 | + |
| 39 | +```console |
| 40 | +conda env create -f binder/environment.yml |
12 | 41 | ```
|
13 | 42 |
|
| 43 | +> **Warning** |
| 44 | +> |
| 45 | +> If you are on Windows and using Command Prompt or the PowerShell, please make sure to adjust the paths in the commands above accordingly. |
| 46 | +
|
14 | 47 | Then activate the environment with
|
15 | 48 | ```console
|
16 | 49 | conda activate python-tutorial
|
17 | 50 | ```
|
18 | 51 |
|
19 |
| -Finally, launch JupyterLab with |
| 52 | +You can update the existing environment (that is, downloading the latest version of the packages) with |
| 53 | + |
20 | 54 | ```console
|
21 |
| -jupyter lab |
| 55 | +conda env update -f binder/environment.yml |
22 | 56 | ```
|
23 | 57 |
|
24 |
| -To update the existing environment, run |
| 58 | +### 3. Launch the tutorial via Jupyter |
| 59 | + |
| 60 | +Finally, launch JupyterLab with |
25 | 61 | ```console
|
26 |
| -conda env update -f environment.yml |
| 62 | +jupyter lab |
27 | 63 | ```
|
0 commit comments