This guide will help you get ready to run lecture notebooks and complete homework assignments on your own computer.
You’ll need three main tools:
If you already know what you’re doing, here are the essential commands:
# Clone the repo
git clone https://github.com/UBC-CS/cpsc330-2026S1.git
cd cpsc330-2026S1
# Add conda-forge channel (Miniconda only)
conda config --add channels conda-forge
# Create environment
conda env create -f cpsc330env.yml
# (Optional) Test activating/deactivating the environment
conda activate cpsc330
conda deactivate
# Start JupyterLab from base
jupyter lab
# Or start VS Code from base
code .
⚠️ Normally, you will launch JupyterLab or VS Code from
(base)and then select thecpsc330environment inside those tools. Activating it in the terminal is only needed for testing or if you want to install additional packages in the environment later on.
WSL: Optional but Recommended Step For WindowsIf you are using Windows, you may want to consider using WSL to run Linux inside Windows. This is especially useful if you are having difficulties setting up your system. For more information, please search for “Windows Subsystem for Linux” (WSL). One recommended Linux distribution is Ubuntu (22.04 LTS or higher). Installing WSL is easy on Windows 11, which allows installation directly from the Microsoft Store. If that does not work for you, here is an alternative installation method covered in this online tutorial.
NOTE 1: Although the course staff are happy to help if you have any technical difficulties, support cannot be guaranteed for WSL or Linux in general. However, if you feel that you can manage it yourself, you are encouraged to do so because the ability to use Linux is certainly a plus. Of course, AI tools should be able to resolve many of the potential issues you may have when using WSL.
NOTE 2: If you are using macOS, you can ignore this tip, as macOS is already a Unix-compliant system.
We use Git to manage and download course material from GitHub. Follow the Git setup instructions.
Once installed:
git clone https://github.com/UBC-CS/cpsc330-2026S1.git
cd cpsc330-2026S1
To update later:
git pull
⚠️ Tip: Don’t keep personal notes inside this repository. Otherwise,
git pullmay fail due to conflicts. Keep notes in a separate folder/repo.
We use Python 3.12 (Python 2 is not supported). To manage Python and packages, you’ll install a Conda distribution. You have two options:
Download Miniforge here. Choose the installer for your operating system.
Download Miniconda here. Choose the installer for your operating system.
After installation:
You should see (base) at the start of your command line prompt:
(base) yourusername@computer:~$
Check installation:
conda --version
python --version
Expected:
conda: recent version (e.g., 24.x.x)
python: 3.12 or greater
If you see Python 2.7, reinstall with Python 3.12.
If you installed Miniconda, add the conda-forge channel:
conda config --add channels conda-forge
If you installed Miniforge, you can skip this step (it’s already the default).
A virtual environment keeps course packages isolated from other projects.
cpsc330env.yml exists in the repo you cloned:
cd cpsc330-2026S1
ls
conda env create -f cpsc330env.yml
conda activate cpsc330
conda deactivate
Your prompt should return to (base) when deactivated.
✅ You only need to create the environment once. Normally, you will stay in
(base)and select thecpsc330kernel in JupyterLab or VS Code.
jupyter lab
JupyterLab will open in your browser. At the top-right corner of your notebook, click on the kernel dropdown. Select the kernel named Python [conda env:cpsc330]. Now you’re running the notebook inside the course environment.
Some of you may prefer using VS Code instead of JupyterLab. Both work fine. It’s your choice.
cpsc330-2026S1 folder.cpsc330-2026S1 and open VS Code:
code .
conda env:cpsc330.⚠️ If you don’t see the interpreter, restart VS Code after creating the environment.
.ipynb file from the repo.cpsc330 kernel if it isn’t already selected.If conda env create -f cpsc330env.yml fails:
cpsc330env.yml.conda install packagename
# or
pip install packagename
Still stuck? Bring your laptop to office hours or tutorials and get help.
If you’re new to JupyterLab and/or Python, here is a short video of an introduction to JupyterLab and Python created by one of the instructors of the course for another course that uses similar tooling.
These installation instructions are based on the MDS software installation instructions.