PIXELBANKv8.2.1
Menu
Back to Foundations

Chapter 0: Development Setup (Optional)

Set up the ideal ML development environment: OS, terminal, VS Code, Python, Git, Jupyter, Docker, and AI coding assistants.

ℹ️

Optional Chapter

This chapter is completely optional for this course. You can skip straight to Python Foundations and start learning right away. That said, most professional AI/ML developers use this exact setup — so if you want to build the same environment the industry uses, this is worth your time.

Chapter Overview

Before writing a single line of ML code, you need a properly configured development environment. This chapter walks you through setting up everything from scratch — even if you've never programmed before.

A good setup is invisible: it stays out of your way and lets you focus on learning. A bad setup creates constant friction — packages that won't install, code that runs differently on different machines, and hours lost debugging environment issues instead of building models.

The ML developer's toolkit:

  1. Operating System — Ubuntu or macOS (Unix-based for compatibility)
  2. Terminal — Your command center for everything
  3. VS Code — The editor where you'll spend most of your time
  4. Python — The language of ML, properly isolated with virtual environments
  5. Git & GitHub — Version control for tracking experiments and collaborating
  6. Jupyter Notebooks — Interactive exploration and visualization
  7. Docker — Containerized environments for reproducibility (industry standard)
  8. AI Coding Assistants — Claude Code, Copilot, and Claude extension to accelerate your workflow

Each topic includes installation steps, configuration, and practical tips. By the end of this chapter, you'll have a professional-grade ML development environment ready to go.

Chapter Roadmap

Click any topic to jump in

1
Operating System

Ubuntu, macOS, or Windows with WSL2 — choosing the right OS and installing system packages for ML.

Ubuntu (recommended)macOSWindows + WSL2Why not plain Windows?Cloud alternative (optional)Install essential system packages (Ubuntu/WSL)Set up your shell profileOptional: Configure SSH keys for GitHub
Your workspace

Command line and editor

2
Terminal & CLI

Navigation, file operations, pipes, and process management — the command center for all ML work.

NavigationFile operationsViewing filesSearchingPiping & redirectionCreate the project directory treePopulate files and search through themUse piping, redirection, and process management
3
VS Code

The editor, extensions for Python and Jupyter, keyboard shortcuts — where you'll write all your code.

InstallationEssential extensionsSettingsKeyboard shortcutsRemote development (optional)Install VS Code and essential extensionsConfigure VS Code settings for MLOptional: Connect to a remote GPU server via SSH
Language and version control

Python and Git

4
Python Installation

Python 3.11+, virtual environments, pip — properly isolated Python that won't break your system.

Python 3.10-3.12venv (recommended for beginners)conda/minicondapiprequirements.txtInstall Python and create the virtual environmentInstall ML packages and pin versionsCreate .gitignore and verify the setup
5
Git & GitHub

Version control for tracking experiments, collaborating, and never losing work.

Repository (repo)CommitBranchStage → Commit → PushPull requests (PRs)Initialize a repository and make your first commitsCreate branches for ML experimentsPush to GitHub and collaborate
Advanced tooling

Interactive computing and containers

6
Jupyter Notebooks

Interactive code cells, inline plots, and markdown — the standard for ML exploration and visualization.

Quickest startCellsKernelInline plotsAdvanced: JupyterLabQuickest start: Jupyter in VS CodeAdvanced: Install JupyterLab for a browser-based experienceOptional: Convert notebooks to Python scripts for production
7
Docker

Containers for reproducible environments — run the same code anywhere without dependency conflicts.

ImageContainerDockerfileDocker HubDocker ComposeInstall Docker and verify it worksWrite a Dockerfile for your ML projectBuild the image and run a container
AI-powered development
8
AI Coding Assistants

Claude Code, Copilot, and VS Code extensions — AI tools that accelerate your coding workflow.

Claude VS Code Extension (start here)GitHub Copilot (paid)Claude Code CLI (advanced, paid)Best practicesLearning with AIInstall Claude extension in VS Code (start here)Optional: Install GitHub Copilot for inline suggestionsAdvanced: Install Claude Code CLI for terminal-based AI

Your operating system is the foundation everything else runs on. In machine learning, the vast majority of tools, libraries, and tutorials assume a Unix-based system — that means Linux or macOS. This isn't just preference; it's practical reality.

Ubuntu (Linux) is the gold standard for ML development:

  • Nearly all ML servers, cloud instances, and Docker containers run Linux
  • GPU drivers (NVIDIA CUDA) work best on Linux
  • Package managers (apt) make installing tools effortless
  • Most open-source ML projects are developed and tested on Linux first

macOS is also excellent — it's Unix-based, so most Linux commands work identically. Apple Silicon (M1/M2/M3/M4) chips have strong ML performance through Metal and MLX.

Windows works, but requires extra setup. The Windows Subsystem for Linux (WSL2) gives you a full Ubuntu environment inside Windows. Without WSL, you'll constantly run into compatibility issues with Python packages, file paths, and shell scripts.

In this topic

1Ubuntu (recommended)
2macOS
3Windows + WSL2
4Why not plain Windows?
5Cloud alternative (optional)
6Install essential system packages (Ubuntu/WSL)
7Set up your shell profile
8Optional: Configure SSH keys for GitHub
1 of 8
Ubuntu (recommended)

Ubuntu is the most widely used OS in ML development. Nearly all cloud instances, Docker containers, and CI/CD pipelines run Ubuntu, so learning it means your local setup matches production. NVIDIA's CUDA toolkit and GPU drivers receive first-class support on Ubuntu, with the latest versions always available through official repos. If you're starting fresh, Ubuntu 22.04 LTS is the safest choice — it has the widest package compatibility and 5 years of security updates.

# Check your Ubuntu version
lsb_release -a

# Check kernel version
uname -r

# Check system architecture
arch
Run these commands in your terminal
Expected output:
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.4 LTS
Release:        22.04
Codename:       jammy
6.5.0-44-generic
x86_64
2 of 8
macOS

macOS is Unix-based, which means nearly all Linux terminal commands work out of the box — no compatibility layers needed. Apple Silicon chips (M1/M2/M3/M4) deliver strong ML performance through Apple's Metal framework and the MLX library optimized for on-device training. The developer experience is polished: Homebrew makes installing packages painless, and tools like iTerm2 and Raycast boost productivity. The main limitation is that NVIDIA CUDA is not available on macOS, so if your workflow depends heavily on CUDA-specific libraries, you'll need a Linux machine or cloud GPU for those tasks.

# Check macOS version
sw_vers

# Check if running Apple Silicon or Intel
uname -m
# arm64 = Apple Silicon, x86_64 = Intel

# Install Homebrew (macOS package manager)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Verify Homebrew
brew --version
Run these commands in your terminal
Expected output:
ProductName:    macOS
ProductVersion: 14.4
BuildVersion:   23E214
arm64
Homebrew 4.2.10
3 of 8
Windows + WSL2

WSL2 (Windows Subsystem for Linux) runs a real Linux kernel inside Windows, giving you full Ubuntu access without dual-booting. Run wsl --install in an admin PowerShell and reboot — you'll have a working Ubuntu terminal in minutes. File system performance is best when you keep your project files inside the Linux filesystem (~/projects/) rather than in /mnt/c/. VS Code's Remote-WSL extension connects seamlessly, so you edit in Windows but run code in Linux.

# Run in PowerShell as Administrator:
wsl --install

# After reboot, set Ubuntu as default
wsl --set-default Ubuntu

# Check WSL version
wsl --list --verbose

# Enter WSL from PowerShell
wsl

# Inside WSL, verify you're running Linux
uname -a
Run these commands in your terminal
Expected output:
  NAME      STATE           VERSION
* Ubuntu    Running         2
Linux DESKTOP-ABC123 5.15.153.1-microsoft-standard-WSL2 x86_64 GNU/Linux
4 of 8
Why not plain Windows?

Plain Windows uses backslash path separators (C:\Users\...) while virtually all ML code and documentation assumes forward slashes (/home/user/...). Many Python packages with C extensions fail to compile on Windows because they expect Unix build tools like make and gcc. Shell scripts, Dockerfiles, and CI configurations are written for bash, not PowerShell or CMD. Even when packages do install, subtle differences in file handling, line endings, and environment variables cause hard-to-debug issues that waste hours.

# Demonstrate the path separator difference
# Linux/macOS (forward slashes):
echo $HOME
# /home/user

# Windows CMD (backslashes):
# echo %USERPROFILE%
# C:\Users\user

# Check if common Unix tools exist
which make gcc bash

# On Linux/macOS these exist; on plain Windows they don't
# This is why ML tools break on Windows without WSL
Run these commands in your terminal
Expected output:
/home/user
/usr/bin/make
/usr/bin/gcc
/usr/bin/bash
5 of 8
Cloud alternative (optional)

Google Colab gives you free GPU access (T4) through a Jupyter-like interface in your browser — no local setup required, just a Google account. For more control, AWS EC2 and Lambda Labs offer GPU instances you can SSH into and configure exactly like a local machine. Cloud GPUs are essential if you need to train large models but don't have a local NVIDIA GPU. For this course, a cloud GPU is not necessary — all exercises run fine on CPU — but knowing these options exist helps when you're ready to scale up.

# Check if you have a GPU locally
nvidia-smi 2>/dev/null && echo "GPU available" || echo "No NVIDIA GPU found"

# SSH into a cloud GPU instance (example)
# ssh user@your-cloud-instance

# Check GPU on remote machine
# nvidia-smi

# Google Colab — no install needed:
# 1. Go to colab.research.google.com
# 2. Runtime → Change runtime type → T4 GPU
# 3. Run: !nvidia-smi
Run these commands in your terminal
Expected output:
No NVIDIA GPU found
6 of 8
Install essential system packages (Ubuntu/WSL)

These packages are required by almost every ML project and Python library.

These system packages form the foundation. build-essential provides the C/C++ compiler needed to install many Python packages from source. libgl1-mesa-glx is required by OpenCV.

# Update package list and upgrade existing packages
sudo apt update && sudo apt upgrade -y

# Install essential build tools (needed to compile Python packages)
sudo apt install -y build-essential curl wget git

# Install Python prerequisites
sudo apt install -y python3 python3-pip python3-venv python3-dev

# Install libraries needed by OpenCV, Pillow, and other ML packages
sudo apt install -y libssl-dev libffi-dev libgl1-mesa-glx libglib2.0-0

# Install Node.js (needed for Claude Code CLI and Jupyter extensions)
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install -y nodejs

# Verify installations
python3 --version
git --version
node --version
Run these commands in your terminal
Expected output:
Python 3.12.3
git version 2.43.0
v20.11.0
7 of 8
Set up your shell profile

Configure bash/zsh with useful aliases and environment variables for ML work.

Shell aliases save keystrokes on commands you type hundreds of times. 'activate' is much faster than 'source .venv/bin/activate', and 'gs' is faster than 'git status'.

# Add useful aliases to your shell profile
# (Use ~/.zshrc on macOS with zsh, ~/.bashrc on Ubuntu/WSL)

echo '' >> ~/.bashrc
echo '# ML Development Aliases' >> ~/.bashrc
echo 'alias py="python3"' >> ~/.bashrc
echo 'alias activate="source .venv/bin/activate"' >> ~/.bashrc
echo 'alias jl="jupyter lab"' >> ~/.bashrc
echo 'alias gs="git status"' >> ~/.bashrc
echo 'alias gc="git commit"' >> ~/.bashrc
echo 'alias gp="git push"' >> ~/.bashrc

# Reload your shell profile
source ~/.bashrc

# Test an alias
gs    # Same as "git status"
Run these commands in your terminal
8 of 8
Optional: Configure SSH keys for GitHub

SSH keys let you push to GitHub without typing your password every time. You can skip this and use HTTPS instead — SSH is just more convenient long-term.

SSH keys use public-key cryptography. Your private key stays on your machine; the public key goes to GitHub. This is more secure than passwords and saves time on every push/pull.

# Generate an SSH key (press Enter for defaults)
ssh-keygen -t ed25519 -C "[email protected]"

# Start the SSH agent
eval "$(ssh-agent -s)"

# Add your key to the agent
ssh-add ~/.ssh/id_ed25519

# Copy the public key to clipboard
cat ~/.ssh/id_ed25519.pub
# Copy the output, then:
# Go to GitHub → Settings → SSH Keys → New SSH Key → Paste

# Test the connection
ssh -T [email protected]
Run these commands in your terminal
Expected output:
Hi username! You've successfully authenticated, but GitHub does not provide shell access.