Coding Jupyter Notebooks for Fall 2025 Iteration of CS 170.
- Install
uv
following the instructions here. - Create a virtual environment (venv) using
uv venv --python 3.9
. - Activate the environment:
- If on macOS/Linux:
source .venv/bin/activate
- If on Windows:
.venv\Scripts\activate
- If on macOS/Linux:
- Install jupyter:
uv pip install jupyter
. - Clone this repository:
git clone https://github.com/Berkeley-CS170/cs170-fa25-coding
. - If you ever want to switch to a different environment, simply run the command
deactivate
. - Profit!!!
For all reasonable use cases, uv
can be used as a drop in replacement for pip
for Python environment management. It's way faster and has a very nice interface. There's a lot more to uv
than venvs! You can read more about it here.
- Make sure that you've completed the initial local setup above.
- Open up your terminal
cd
into your specific coding homework directory, e.g.:cd <wherever your homework lives>/cs170-fa25-coding/hw02
- Make sure you've activated the venv:
source .venv/bin/activate
or.venv\Scripts\activate
if on Windows. - Install all python package requirements for that homework:
or run the command in the notebook cell. If there isn't a
uv pip install -r requirements.txt
requirements.txt
file in the coding homework directory, you can skip this step. - Launch jupyter:
jupyter notebook
orjupyter lab
. You can also use directly VSCode's built in ipynb UI, which is quite nice and featureful (in which case you won't even need to activate the venv, you'll be prompted to select the kernel for the notebook, and then pick the venv you created). - Navigate to the jupyter notebook for the assignment and complete it! Good luck :D
- Once you're done, submit your completed
.ipynb
file to Gradescope, and if you want, deactivate
- Install Anaconda following the instructions here.
- Open up your terminal.
- Create a conda environment (with python 3.9):
conda create -n cs170 python=3.9
- Activate the environment:
conda activate cs170
- Install pip:
conda install pip
- Install jupyter:
conda install jupyter
- Clone this repository somewhere in your device:
git clone https://github.com/Berkeley-CS170/cs170-fa25-coding
- Once you're done, deactivate the conda environment to return to your default environment:
conda deactivate