8000 Extend Readme on how-to run tutorial locally (#65) · gaehlerm/python-tutorial@e6999fc · GitHub
[go: up one dir, main page]

Skip to content

Commit e6999fc

Browse files
Extend Readme on how-to run tutorial locally (empa-scientific-it#65)
Co-authored-by: Aliaksandr Yakutovich <yakutovicha@gmail.com>
1 parent 9e128de commit e6999fc

File tree

1 file changed

+42
-6
lines changed

1 file changed

+42
-6
lines changed

README.md

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,59 @@
55

66
## Run the tutorial on your computer
77

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
931

1032
```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
1241
```
1342

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+
1447
Then activate the environment with
1548
```console
1649
conda activate python-tutorial
1750
```
1851

19-
Finally, launch JupyterLab with
52+
You can update the existing environment (that is, downloading the latest version of the packages) with
53+
2054
```console
21-
jupyter lab
55+
conda env update -f binder/environment.yml
2256
```
2357

24-
To update the existing environment, run
58+
### 3. Launch the tutorial via Jupyter
59+
60+
Finally, launch JupyterLab with
2561
```console
26-
conda env update -f environment.yml
62+
jupyter lab
2763
```

0 commit comments

Comments
 (0)
0