@@ -23,70 +23,49 @@ It is recommended to read the numpy structured array
2323
2424Please create the relevant environment before the workshop. If you encounter problems, please raise a question in the [ discussion board] ( https://github.com/orgs/PowerGridModel/discussions )
2525
26- ### Preparation for Windows (beginners guide)
27-
28- 1 . [ Download] ( https://github.com/PowerGridModel/power-grid-model-workshop/archive/refs/heads/main.zip ) (or
29- checkout) this workshop/repository and remember the destination location. For example:
30- ` C:\Users\YourUserName\Downloads\power-grid-model-workshop ` .
31-
32- 1 . Install the latest [ Python] ( https://www.python.org/ftp/python/3.13.3/python-3.13.3-amd64.exe ) version.
33- You probably want the ** Windows installer (64-bit)** under ** Stable Release** .
34-
35- 1 . Now open a terminal (Windows-Key + R, type ` cmd ` , press ** OK** ) and use the ` cd ` (change dir) command to navigate
36- to the folder where you downloaded the workshop. For example:
37- ``` shell
38- C:\U sers\Y ourUserName> cd Downloads\p ower-grid-model-workshop
39- C:\U sers\Y ourUserName\D ownloads\p ower-grid-model-workshop> _
40- ```
41- 1 . Optional: Create and activate a virtual environment. You can skip this step, but it helps you to keep your system
42- clean, as we will be installing about 70 Python packages in the next step.
43- ``` shell
44- > python -m venv venv
45- > venv\S cripts\a ctivate
46- ```
47- 1 . install Power Grid Model and some other packages we'll use for this workshop:
26+ ### Preparation with uv (Windows/Mac/Linux)
27+
28+ 1 . Open a terminal
29+ - Windows: Press ` Windows-Key + R ` , type ` cmd ` , press ** OK**
30+ - Mac/Linux: Open a terminal
31+ 1 . Download or clone this workshop/repository
32+ - if you download the repository, remember the destination location. For example:
33+ - Windows:` C:\Users\YourUserName\Downloads\power-grid-model-workshop `
34+ - Mac/Linux: ` ~/Downloads/power-grid-model-workshop `
35+ 1 . Install the ` uv ` package manager [ link] ( https://docs.astral.sh/uv/getting-started/installation )
36+ for your operating system (Windows/Mac/Linux)
37+ 1 . Navigate to the repository folder
38+ - Windows: ` cd Downloads\power-grid-model-workshop `
39+ - Mac/Linux: ` cd ~/Downloads/power-grid-model-workshop `
40+ 1 . Setup python environment and install dependencies using ` uv ` :
4841 ``` shell
49- > pip install power-grid-model jupyter pandas matplotlib
42+ uv sync
5043 ```
51- 1. Now run jupyter notebook. It will probably (depending on your system) automatically open a browser at
44+ 1. Start jupyter notebook. It will probably (depending on your system) automatically open a browser at
5245 http://localhost:8888. If not, the console output will tell you where to find the jupyter notebook server.
5346 ` ` ` shell
54- > jupyter notebook
47+ uv run jupyter notebook
5548 ` ` `
56491. Try any of the ` .ipynb` files, for example
5750 [` Power Flow Example.ipynb` ](http://localhost:8888/notebooks/examples/Power%20Flow%20Example.ipynb) and press the ` >> `
5851 button to run the entire file. Note that the last section in the Power Flow Example is about error handling, so
5952 don' t get scared if you see some error messages there.
6053
61-
6254### Next time, pick up where you left off
6355
64- 1. Open a terminal (Windows-Key + R, type `cmd`, press **OK**) and use the `cd` (change dir) command to navigate
65- to the folder where you downloaded the workshop. For example:
66- ```shell
67- C:\Users\YourUserName> cd Downloads\power-grid-model-workshop
68- C:\Users\YourUserName\Downloads\power-grid-model-workshop>_
69- ```
70- 2. Optional: Activate the virtual environment (if you created one initially).
71- ```shell
72- > venv\Scripts\activate
73- ```
74- 3. Run jupyter notebook. It will probably (depending on your system) automatically open a browser at
56+ 1. Again, open a terminal
57+ - Windows: Press `Windows-Key + R`, type `cmd`, press **OK**
58+ - Mac/Linux: Open a terminal
59+ 1. Navigate to the repository folder
60+ - Example:
61+ - Windows: `cd Downloads\power-grid-model-workshop`
62+ - Mac/Linux: `cd ~/Downloads/power-grid-model-workshop`
63+
64+ 1. Start jupyter notebook. It will probably (depending on your system) automatically open a browser at
7565 http://localhost:8888. If not, the console output will tell you where to find the jupyter notebook server.
7666 ```shell
77- > jupyter notebook
67+ uv run jupyter notebook
7868 ```
79-
80- ### Preparation for WSL2 or Linux (for advanced users)
81-
82- If you know WSL2/Linux you should be able to configure environment yourself.
83-
84- ```shell
85- > pip install power-grid-model jupyter pandas
86- > jupyter notebook
87- ```
88-
89- Open the jupyter notebook [`Power Flow Example.ipynb`](http://localhost:8888/Power%20Flow%20Example.ipynb), try to run it.
9069
9170## License
9271
0 commit comments