Orientation and Python Environment Setup
Set up the Python environment, tools, and workflows you will use throughout the course.
Content
Software Requirements
Versions:
Watch & Learn
AI-discovered learning video
Software Requirements for Introduction to Artificial Intelligence with Python
"Good tools make good prototypes. Bad tools make existential dread."
You already saw the Learning Outcomes and Syllabus Overview. Now we get practical: this page tells you exactly what software you need, why each piece matters, and how to avoid the classic student traps that turn a 10-minute setup into a full-blown debugging saga.
What Is the "Software Requirements" section and why should you care?
Software Requirements lists the programs, libraries, drivers, and helpers you need to run AI experiments in Python. This is not just busywork — it shapes reproducibility, performance, and whether your model runs in five minutes or five hours while you watch the terminal cry.
Put another way: the syllabus tells you what you will learn; this tells you what must be installed so your learning is actually usable.
Core components (must-haves)
- Python 3.9 or 3.10 (avoid 3.11 for some deep learning packages as of course start; always check framework compatibility)
- Why: most AI libraries officially target these versions for compatibility and stable support.
- Package manager: conda (recommended) or pip + venv
- Conda simplifies binary dependencies (numpy, pytorch, tensorflow) and GPU builds.
- Virtual environments: conda env or python -m venv
- Why: keeps project dependencies isolated. You will thank yourself later.
- Jupyter Notebook / JupyterLab
- For interactive experiments, visualization, and sharing results.
- IDE / Editor: VS Code (recommended), PyCharm, or similar
- VS Code + Python extension gives great debugging and notebook support.
- Git and GitHub account
- Version control + sharing your notebooks and code.
- Core Python libraries: numpy, pandas, matplotlib, scikit-learn
- Deep learning frameworks: PyTorch (recommended for class examples), TensorFlow (optional alternate)
- Optional but strongly recommended: NVIDIA GPU + CUDA (for heavy models or faster training)
- Docker (optional) — if you prefer containerized reproducibility or are using someone else's image
Installation roadmap (the order matters)
- Install Python or Miniconda (Miniconda is lightweight and recommended).
- Install and configure VS Code.
- Create an environment (conda create -n ai-course python=3.10) or venv.
- Activate environment, install JupyterLab and base libs.
- If you have an NVIDIA GPU: install drivers, CUDA, cuDNN, then install GPU-enabled PyTorch/TensorFlow.
- Verify with small test scripts (commands below).
Example conda commands:
# install miniconda (if not installed) then
conda create -n ai-course python=3.10 -y
conda activate ai-course
conda install jupyterlab numpy pandas matplotlib scikit-learn -y
# install pytorch (CPU or GPU depends on your system) - get exact command from pytorch.org
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
# or GPU command via conda/pip as specified on pytorch site
If you prefer pip and venv:
python3 -m venv ai-course-venv
source ai-course-venv/bin/activate # or .\ai-course-venv\Scripts\activate on Windows
pip install --upgrade pip
pip install jupyterlab numpy pandas matplotlib scikit-learn torch torchvision
Quick verification checks (run these right after install)
- Python version:
python --version
- Jupyter works:
jupyter lab --version
- Basic libraries import test:
python - <<PY
import sys
print('Python', sys.version)
import numpy as np
import pandas as pd
import sklearn
import torch
print('NumPy', np.__version__)
print('Pandas', pd.__version__)
print('Scikit-learn', sklearn.__version__)
print('PyTorch', torch.__version__)
PY
- GPU detection (if you have an NVIDIA GPU and installed GPU-enabled torch):
import torch
print('CUDA available:', torch.cuda.is_available())
print('Device count:', torch.cuda.device_count())
print('Device name:', torch.cuda.get_device_name(0) if torch.cuda.is_available() else 'CPU only')
Table: quick comparison (conda vs venv, PyTorch vs TensorFlow)
| Choice | Pros | Cons | Recommended when... |
|---|---|---|---|
| conda | Binary management, easy GPU builds | Larger install, different ecosystem from pip | You want simple installs and reproducible environments |
| venv + pip | Smaller, standard Python tooling | More manual dependency handling, builds may fail | You prefer minimalism or deploying to pip-based systems |
| PyTorch | Pythonic, dynamic graphs, community support | Some older deployment tools less mature | Rapid model prototyping and research |
| TensorFlow | Mature ecosystem, TF Serving, Keras integration | API complexity for beginners | Production serving or when course uses TF examples |
Common mistakes and how to avoid them
- Installing packages globally: you will pollute your system Python and create version conflicts. Use virtual envs.
- Mixing conda installs with pip installs without caution: prefer conda for heavy binaries and pip for pure-Python packages, or use conda-forge channel.
- Ignoring GPU/CPU compatibility: installing CUDA mismatched to drivers will silently fail. Always check the framework's recommended CUDA version.
- Not restarting VS Code or Jupyter after changing envs: your kernel might still point at the old Python.
Why do people keep misunderstanding this? Because software environment issues are invisible until they aren't — like a silent comedy of errors. The fix is to be explicit: which env, which python, which driver.
Pro tips and small rituals that save hours
- Name your env with the course name: keeps it obvious (eg. ai-intro-2026).
- Keep an environment.yml or requirements.txt committed to your repo so others can reproduce your work.
- Use VS Code workspace settings to pin the interpreter for that project.
- If you hit a nasty binary error, try a fresh conda env before despairing.
Expert take: "If your machine is a kitchen, virtual environments are labeled jars. You could throw flour in the pantry, or you could keep it in a jar labeled 'cookies' so you dont bake regret."
Closing: the minimal checklist to start Week 1
- Python 3.9/3.10 installed
- Virtual environment created and activated
- JupyterLab installed and runs
- numpy, pandas, matplotlib, scikit-learn installed and importable
- PyTorch installed and torch import succeeds
- Git configured and linked to GitHub
- (Optional) GPU drivers and CUDA configured if you plan on heavy training
This setup will let you follow the course labs and run the code examples without spending your study time on dependency spelunking. Once you have this in place, we can move on from "how to install" to the delicious stuff: building models, visualizing data, and making tiny intelligences that sometimes behave like pets and sometimes like chaotic toddlers.
Happy installing. If things break, read the error, screenshot it, and bring it to office hours — we love debugging tragedies that end well.
Comments (0)
Please sign in to leave a comment.
No comments yet. Be the first to comment!