Setup

Programming Language

We’ll use Python to work with data throughout this course. Python is an excellent choice for deep learning and complex systems analysis for its rich ecosystem of libraries, readable and intuitive syntax, and well-documented documentation.

Create a Virtual Environment via uv

We strongly recommend using virtual environments to manage your Python packages. Virtual environments create isolated Python installations for each project, avoiding dependency hell and providing several key benefits:

Note

Don’t confuse Python virtual environments with virtual machines (VMs). Python virtual environments are lightweight isolation tools that only separate Python packages and dependencies within the same operating system. Virtual machines, on the other hand, create complete isolated operating systems.

Figure 1: Without virtual environments, you risk dependency hell where package conflicts make your projects unusable.

We recommend using uv. uv is a fast Python package and project manager. While we won’t be running uv commands directly in this course, you’ll need uv to properly run Marimo notebooks, which provides a much better development experience. See here for installation instructions.

Follow the following steps to install uv, along with the minimum Python packages required for this course.

  1. Install uv
  2. Run the following command to create a new environment with the minimum Python packages required for this course.
uv venv -p 3.11
uv pip install matplotlib scipy numpy pandas seaborn pytorch torchvision marimo
  1. Activate the environment.
source .venv/bin/activate

Jupyter Marimo Notebook

We’ll use Marimo (GitHub) notebooks for assignments and interactive exercises throughout the course. Marimo is a reactive Python notebook that automatically updates when you change code, making it perfect for exploring deep learning models and seeing results in real-time.

Note

Marimo integrates especially tightly with uv and provides a package sandbox feature that lets you inline dependencies directly in notebook files. This is the easiest way to get started - no prior uv knowledge required.

Creating a sandboxed notebook:

uvx run --sandbox my_notebook.py

This command installs marimo in a temporary environment, tracks your dependencies and stores them in the notebook file, and automatically downloads any existing dependencies.