@@ -9,28 +9,45 @@ Before using this repo, make sure you’ve completed the [environment setup guid
99
1010## Necessary Packages
1111The Python module uses its own isolated environment called ` python-env ` so that packages don’t conflict with other projects.
12- We use ** uv** to create this environment, activate it, and install the required packages listed in the module’s ` pyproject.toml ` .
12+ We will use ** uv** to create this environment, activate it, and install the required packages listed in the module’s ` pyproject.toml ` .
1313This setup only needs to be done ** once per module** , after that, you just activate the environment whenever you want to work in this repo.
1414
15- Open a terminal (macOS/Linux) or Git Bash (Windows) in this repo, and run the following commands in order:
15+ ** Open a terminal (macOS/Linux) or Git Bash (Windows)** and run the following commands in order:
1616
17- 1 . Create a virtual environment called ` python-env ` :
18- ```
17+ 1 . Navigate to the directory where you want to clone the module’s repo and then confirm that you are in the correct location:
18+ ```
19+ cd your/directory/here
20+ pwd
21+ ```
22+
23+ 2 . Clone the module's repo to your computer:
24+ ```
25+ git clone <https://github.com/UofT-DSI/python.git>
26+ ```
27+
28+ 3 . Navigate into the repo folder you just cloned, then confirm that you are in the correct directory.
29+ ```
30+ cd python
31+ pwd
32+ ```
33+
34+ 4 . Create a virtual environment called ` python-env ` :
35+ ``` bash
1936 uv venv python-env --python 3.11
2037 ```
2138
22- 2 . Activate the environment:
39+ 5 . Activate the environment:
2340 - for macOS/Linux:
24- ```
41+ ` ` ` bash
2542 source python-env/bin/activate
2643 ` ` `
2744
2845 - for windows (git bash):
29- ```
46+ ` ` ` bash
3047 source python-env/Scripts/activate
3148 ` ` `
3249
33- 3 . Install all required packages from the [pyproject.toml](./pyproject.toml)
50+ 6 . Install all required packages from the [pyproject.toml](./pyproject.toml):
3451 ` ` ` bash
3552 uv sync --active
3653 ` ` `
@@ -66,15 +83,22 @@ deactivate
6683### Step 1: Open VS Code:
6784Launch Visual Studio Code.
6885
69- ### Step 2: Create or Open a Notebook
86+ ### Step 2: Open the Repo Folder in VS Code
87+ 1 . Click File → Open Folder
88+ 2 . Select the repo folder.
89+ 3 . Click Open
90+ ![ ] ( ./03_instructional_team/setup_images/open_repo_folder.png )
91+
92+ ### Step 3: Create or Open a Notebook
70931 . Create a new notebook:
7194 - In the menu bar, click on the File button. From the dropdown list, click New File.
7295 - You can then type in Jupyter and select the Jupyter Notebook option.
7396 - The file should have an .ipynb extension (e.g., new_notebook.ipynb) when you save it.
74- 2 . Note that later on you will also be opening existing Jupyter Notebook files.
97+ 2 . Save your Jupyter notebooks _ inside_ the repo folder so that you do not get "kernel not found" or "module not found" errors in later steps.
98+ 3 . Note that later on you will also be opening existing Jupyter Notebook files.
7599![ ] ( ./03_instructional_team/setup_images/create_new_notebook.png )
76100
77- ### Step 3 : Select the Kernel
101+ ### Step 4 : Select the Kernel
781021 . Look for the Kernel Picker in the top-right corner of the notebook interface in VS Code and click it. It will say something like Select Kernel if no kernel is currently selected.
79103![ ] ( ./03_instructional_team/setup_images/kernel_picker.png )
80104
@@ -86,10 +110,10 @@ Launch Visual Studio Code.
86110![ ] ( ./03_instructional_team/setup_images/select_python_env.png )
87111
88112
89- ### Step 4 : Verify the Kernel
113+ ### Step 5 : Verify the Kernel
90114
911151 . Once the kernel is connected, you should see the name ` python-env ` in the top-right corner of the notebook editor.
92- 2 . Test the kernel by typing import numpy as np into the "cell" (the box in the notebook) and clicking the run button (▶️) next to the cell.
116+ 2 . Test the kernel by typing ``` import numpy as np ``` into the "cell" (the box in the notebook) and clicking the run button (▶️) next to the cell.
93117
94118![ ] ( ./03_instructional_team/setup_images/verify_kernel.png )
95119
0 commit comments