Using Python at Home

Python is a versatile programming language, but getting set up to use Python on your computer can sometimes be tricky. This page provides a few options for using Python ‘at home’ after you’re done with CSE 160.

Downloading CSE 160 JupyterHub Files

Note that your CSE 160 files on JupyterHub will be deleted at the end of the Spring 2026 quarter.

If you want to save your Python files from the class (i.e. homework assignments, programming practices, lecture examples), follow these steps:

  1. In your JupyterHub, open a terminal and type:
cd ~
  1. Create a .zip file containing all of the files in the COURSE_MATERIALS folder by typing:
zip cse160.zip ./COURSE_MATERIALS -r
  1. Once you see the cse160.zip file in your JupyterHub root directory (you might need to refresh your page after running the command from step 2), right click on the file and select “Download”.

Screenshot of the right-click menu showing the "Download" option for the cse160.zip file on JupyterHub

  1. Download the .zip file to a location on your own computer. Then, unzip the file (double click on Mac, right click and select “Extract All” on Windows), creating a folder called COURSE_MATERIALS containing all of your CSE 160 files!

Google Colab

Google Colab offers online Python notebooks (.ipynb files) integrated with your Google Drive account. You can use all of the Python notebook functionality showcased in Lecture 26 (including writing and running Python code) on Colab without having to install anything on your computer!

Installing Python Locally

Installing Python on your computer is a somewhat involved process, but if you anticipate programming in Python a lot in the future the setup is worth it.

Anaconda

Anaconda is a tool that simplifies Python package management, making installing Python easier.

To install Anacaonda, go to the Anaconda website and download and run the (graphical) installer for your operating system. You don’t need to sign up or register for anything! If prompted, there should be a “Skip Registration” you can click.

The download is around 900 MB, so you may have to be patient. It is normal for the Anaconda setup process to take a few minutes.

Once downloaded, double-click it to start the installer and follow the setup instructions.

Python Environment

Python environments in Anaconda are self-contained Python installations meant to limit version conflicts and isolate different Python projects. We recommend creating a cse160 environment, which includes all of the Python packages we’ve used in the course. To create this environment, follow these steps:

  1. Download the 160environment.yaml file, which specifies all requisite Python packages (and their respective versions).

Some web browsers might automatically save the .yaml file as a .txt file. Please rename the file to have the .yaml extension. The file’s full name should be 160environment.yaml.

  1. Open Anaconda Navigator (this application was installed when you set up Anaconda). The application may take a minut to load.
  2. Navigate to the “Environments” section of Anaconda Navigator and click Import at the bottom of the screen.
  3. Click on the folder icon next to “Local drive” and select 160environment.yaml you downloaded in step 1.
  4. Replace the text in the “New environment name” field with cse160.
  5. Click import. Depending on your computer and internet connection, this may take a while to complete.

Screenshot of the Anaconda Navigator "Import Environment" popup, with red arrows pointing to the "Import" button at the bottom of Anaconda Navigator, the folder icon next to "Local drive" in the popup, the "New environment name" field being set to "cse160" and the "Import" button to complete the environment setup process.

Development Environments

The choice of development environment (i.e. where you write and run your code) is a weighty one for programmers. In CSE 160, we’ve encountered two development environments: .py files run with the terminal on JupyterLab (JupyterHub runs JupyterLab!) and .ipynb Python notebook files (via Jupyter Notebook) that combine code, data, and markdown text.

From the “Home” tab in Anaconda Navigator, you can install and launch a local version of either JupyterLab or Jupyter Notebook.

VSCode is another popular integrated development environment (IDE) that supports many different programming languages and includes helpful debugging tools. You can launch VSCode via the Anaconda Navigator home page or download VSCode from its website.

Anaconda Navigator "Home" tab with red boxes around the JupyterLab, VSCode, and Jupyter Notebook options