Course map
Stage 1: Foundations
Stage 2: Machine Learning
Stage 3: Deep Learning
Stage 4: LLMs & Generative AI
Stage 5: Production & Specialization

Part 01 / Topic 1 of 7

Setting up

AI code depends on a stack of packages — NumPy, pandas, scikit-learn, PyTorch — and their versions matter. A model trained under one version can behave differently under another. So every AI project starts the same way: a virtual environment with pinned versions.

python -m venv .venv
source .venv/bin/activate        # Windows: .venv\Scripts\activate
pip install -r requirements.txt

Real-world example: Two teammates get different accuracy numbers from the same script. The cause is almost always different package versions — which a shared requirements.txt prevents.

This repo's requirements.txt pins the exact versions every example was run with. Where you work matters less: VS Code, Jupyter, or a plain terminal all work. The course uses plain .py files so everything is runnable and diffable.

🧪 Quick quiz — answer from memory, then check.

  1. Why use a virtual environment for an AI project?
Show the answer

It isolates the project's package versions from other projects — each project pins its own numpy, torch and so on, so upgrading one project does not break another.

Done here? The practice set for Part 1 — 4 exercises with solutions — is on the part page.

Search the guide