TAI BUI
Back to curriculum
BuildPython

Your Machine, Configured

Four layers, installed bottom-up, each one isolated from the last. Get this right once and you never think about it again. Skip it and you'll spend the next 500 lessons debugging tooling instead of learning anything.

TIME: ~75 minutesPREREQUISITES: None

Learning Objectives

  • Set up Python (via uv), Node.js, and Rust toolchains from scratch, and verify GPU access with CUDA/MPS
  • Understand the four-layer stack (system, package managers, runtimes, AI libraries) and why isolation lives at the runtime layer
  • Create isolated environments with uv, venv, or conda, write a pyproject.toml with optional dependency groups, and generate lockfiles for reproducibility
  • Diagnose and fix the common failure modes: global installs, pip/conda mixing, forgotten activations, and CUDA version mismatches

The Problem

You're about to work through this entire curriculum: hundreds of lessons across Python, TypeScript, Rust, and Julia. If your machine isn't configured right, every one of those lessons turns into a fight with tooling instead of a lesson about AI. I've watched people burn entire afternoons on import errors, version conflicts, and missing CUDA drivers before they've written a single meaningful line of code. We're doing this once, and we're doing it properly.

Here's the part most people get wrong. They treat setup as a single event: install Python, install some packages, done. Then two weeks later they install PyTorch 2.4 for a fine-tuning project, and the following week a different project needs PyTorch 2.1 because its CUDA build is pinned to it. Upgrade globally and the first project breaks. Downgrade and the second one breaks. That's dependency hell (two things you depend on needing incompatible versions of the same package), not an edge case: it's the default outcome of treating your machine as one shared bucket of packages. It happens constantly in AI work specifically because PyTorch, JAX, and TensorFlow each ship their own CUDA bindings, model libraries pin exact framework versions, and a PyTorch build for CUDA 12.4 simply will not run on a driver that only supports CUDA 11.8. (The reverse is fine: drivers are forward-compatible, so a CUDA 11.8 build runs on a CUDA 12.x driver.)

The fix for both problems is the same idea applied at different altitudes: get the four foundational layers installed correctly once, and then give every project its own isolated slice of those layers so they can never step on each other.

Warm-up0/3
1. You have two apps on one computer, and each needs a different version of the same library. What is the most sensible way to keep both working?Warm-up
One computer holding two apps: a photo app that needs version 1.4 of a library and a report app that needs version 2.0 of the same library, both pointing at a single box for the library whose installed version is a question mark.
2. A program says it needs driver version 12 or newer, and your computer has version 11. What will most likely happen?Warm-up
A program card saying it needs driver version 12 or newer, a computer card saying the installed driver is version 11, and a number line from 9 to 14 with the installed 11 marked and the needed range starting at 12.
3. What is a terminal, in everyday computing terms?Warm-up
A window titled Terminal showing three commands typed after a dollar prompt (pwd, ls and echo hello), each followed by its printed answer: a folder path, two file names and the word hello.
Check: The Problem0/1
1. You upgraded PyTorch globally for a new project, and an older project that needs PyTorch 2.1 now fails. Which practice would have prevented this?Analyze
The global system Python changing from torch 2.1 to torch 2.4 after pip install -U torch, and an older project that needs PyTorch 2.1 now failing.

The Concept

An AI engineering environment has four layers, and they only work if you install them bottom-up, because each one depends on the one below it.

Mermaid diagram

  • System foundation: OS, shell, compilers, GPU drivers. Everything else sits on top of this.
  • Package managers: pip/uv, npm/pnpm, cargo. How you pull code into a project.
  • Language runtimes: the actual Python, Node.js, and Rust installations, at specific versions.
  • AI libraries: PyTorch, JAX, transformers, whatever a given lesson needs. The layer that breaks most often, because it's the one with the most version sensitivity.

Layer 3 is where isolation actually matters. You don't have "a Python": you have one version, with one set of packages, for one project. Mix that up and you get the dependency hell from above. So layer 3 never gets installed once, globally. It gets installed per project, in its own sandbox (a walled-off space where nothing inside it can affect, or be affected by, anything outside it).

Mermaid diagram

Here's the concrete version of that problem: say two projects on your machine both need the requests library, but one needs version 2.28 and the other needs 2.31. Install requests once, globally, and only one of those two projects can ever be satisfied at a time. The fix is to give each project its own copy of Python and its own copies of every package it needs, so upgrading one project's dependencies never touches another's. That's a virtual environment: an isolated directory holding its own interpreter (the actual python program that runs your code) and its own packages, invisible to every other project on the machine. Everything in the rest of this lesson (uv, venv, conda, lockfiles, the per-phase layout) is machinery for making that isolation reliable and reproducible.

Check: The Concept0/4
1. What is a virtual environment in Python?Define
Terminal after python3 -m venv .venv: the .venv folder holds bin, include, lib, lib64 and pyvenv.cfg; bin lists python and pip programs and activate scripts; pyvenv.cfg gives the home interpreter and version; site-packages holds pip.
2. In the four-layer environment stack, which layer must be installed first?Define
Four unordered tiles for a brand new computer: AI/ML Libraries (PyTorch, JAX), Language Runtimes (Python, Node.js), System Foundation (OS, shell, GPU drivers) and Package Managers (pip, npm, cargo).
3. Why do AI projects need a separate virtual environment?Explain
Two projects on one laptop: Project A needs PyTorch 2.4 and Project B needs PyTorch 2.1, both pointing at a single box for the machine's Python whose installed PyTorch version is a question mark.
4. Why is the language runtime layer where per-project isolation belongs?Explain
Four stacked layers for two projects on one machine: AI libraries (torch 2.4 for Project A, torch 2.1 for Project B), language runtime highlighted (Python 3.12 for A, Python 3.11 for B, each with its packages), and package managers and system foundation listed once.

Build It

Step 1: System Foundation

Check your system and install the basics. If you're on Windows, start with WSL2: it runs a real Linux environment inside Windows, and you need it because almost all AI tooling assumes a Linux-like environment and turns into a fight on native Windows.

Quick terminal primer, since most of this lesson is commands: a terminal is a text window where you type a command and press Enter to run it. The blocks below show exactly what to type, one line at a time. If you ever see a command example elsewhere prefixed with $ or %, that's just the terminal's own prompt showing it's ready for input, not a character you type yourself. Lesson 4 covers the terminal in full; here's the minimum to get through this one.

bash
# macOS
xcode-select --install
brew install git curl wget
 
# Ubuntu/Debian
sudo apt update && sudo apt install -y build-essential git curl wget
 
# Windows (use WSL2)
wsl --install -d Ubuntu-24.04

Step 2: Python, via uv

We use uv for Python because it's 10-100x faster than pip (Python's original package installer), and it handles Python versions, virtual environments, and dependency resolution in one tool.

bash
curl -LsSf https://astral.sh/uv/install.sh | sh
 
uv python install 3.12
 
uv venv
source .venv/bin/activate  # or .venv\Scripts\activate on Windows
 
uv pip install numpy matplotlib jupyter

Verify:

python
import sys
print(f"Python {sys.version}")
 
import numpy as np
print(f"NumPy {np.__version__}")
a = np.array([1, 2, 3])
print(f"Vector: {a}, dot product with itself: {np.dot(a, a)}")

Or skip the manual venv step and let uv scaffold a whole project, pyproject.toml included:

bash
uv init my-ai-project
cd my-ai-project
uv add torch numpy matplotlib

No uv? Python ships venv built in. It's slower, but it works anywhere Python is installed:

bash
python3 -m venv .venv
source .venv/bin/activate  # Linux/macOS
.venv\Scripts\activate     # Windows
 
pip install torch numpy

And there's conda, which earns its keep when you need non-Python dependencies (a specific CUDA toolkit, cuDNN, C libraries) without touching the system: you're on a shared cluster where you can't install system packages, or a library's own install instructions say "use conda."

bash
# Install miniconda (not the full Anaconda)
curl -LsSf https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -o miniconda.sh
bash miniconda.sh -b
 
conda create -n myproject python=3.12
conda activate myproject
 
conda install pytorch torchvision torchaudio pytorch-cuda=12.4 -c pytorch -c nvidia

One rule if you go this route: if you use conda for an environment, use conda for every package in it. Mixing pip install into a conda env breaks conda's dependency tracking in ways that are painful to debug later. If a package truly is pip-only, install all your conda packages first and add pip packages last.

Step 3: pyproject.toml Instead of Three Files

Every Python project should have a pyproject.toml. It replaces setup.py, setup.cfg, and requirements.txt with one file, and it's where optional dependency groups live:

toml
[project]
name = "taibui-dev"
version = "0.1.0"
requires-python = ">=3.11"
dependencies = [
    "numpy>=1.26",
    "matplotlib>=3.8",
    "jupyter>=1.0",
    "scikit-learn>=1.4",
]
 
[project.optional-dependencies]
torch = ["torch>=2.3", "torchvision>=0.18"]
llm = ["anthropic>=0.39", "openai>=1.50"]

Install exactly the slice you need:

bash
uv pip install -e ".[torch]"     # base + PyTorch
uv pip install -e ".[llm]"       # base + LLM SDKs
uv pip install -e ".[torch,llm]" # everything

Step 4: Lockfiles

A pyproject.toml says what you want; a lockfile says exactly what you got, down to every transitive dependency (a dependency pulled in automatically because one of your direct dependencies needs it). That's what makes an install reproducible: anyone who installs from your lockfile ends up with identical package versions.

bash
# uv generates uv.lock automatically when using uv add
uv add numpy
 
# pip-tools-style approach
uv pip compile pyproject.toml -o requirements.lock
uv pip install -r requirements.lock

Commit the lockfile to git alongside pyproject.toml. Never commit .venv/ itself. It's 200MB-2GB of machine-specific binaries that don't travel between machines:

bash
echo ".venv/" >> .gitignore

Step 5: One Environment Per Phase, Not One Environment For Everything

You could build a single environment for this whole course. Don't: different phases need different, sometimes conflicting, dependencies. The layout that actually holds up:

taibui-dev/
├── .venv/                    <-- shared lightweight env for phases 0-3
├── phases/
│   ├── 04-neural-networks/
│   │   └── .venv/            <-- PyTorch env
│   ├── 05-cnns/
│   │   └── .venv/            <-- same PyTorch env (symlink or shared)
│   ├── 08-transformers/
│   │   └── .venv/            <-- might need different transformer versions
│   └── 11-llm-apis/
│       └── .venv/            <-- API SDKs, no torch needed

Step 6: The Mistakes That Actually Happen

Five failure modes account for nearly every environment bug you'll hit:

Installing globally. pip install torch with no venv active writes to your system Python, not your project. Activate first, then check:

bash
which python       # should show .venv/bin/python, not /usr/bin/python
which pip           # should show .venv/bin/pip

Mixing pip and conda. Once you conda install pytorch, keep going with conda. A stray pip install some-other-package inside a conda env can silently break conda's own dependency tracking.

Forgetting to activate. python train.py with no venv active runs against system Python and "can't find" packages you know you installed. Before you trust the run, check that your shell prompt shows the environment name: (.venv) $ python train.py.

Committing .venv/ to git. See Step 4: don't.

CUDA version mismatch. Your driver and your PyTorch build both claim a CUDA version, and the build's can't be newer than the driver's:

bash
nvidia-smi                                              # driver's CUDA version, e.g. 12.4
python -c "import torch; print(torch.version.cuda)"    # PyTorch's CUDA version
 
# PyTorch's CUDA version must be <= the driver's.

Step 7: Node.js with pnpm

For the TypeScript lessons: agents, MCP servers, web apps.

bash
curl -fsSL https://fnm.vercel.app/install | bash
fnm install 22
fnm use 22
 
npm install -g pnpm
 
node -e "console.log('Node', process.version)"

Step 8: Rust

For performance-critical lessons: inference, systems work.

bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
 
rustc --version
cargo --version

Step 9: Julia (Optional)

For the math-heavy lessons where Julia earns its place.

bash
curl -fsSL https://install.julialang.org | sh
 
julia -e 'println("Julia ", VERSION)'

Step 10: GPU Setup (If You Have One)

AI workloads are, underneath, huge numbers of small multiply-and-add operations that don't depend on each other. A CPU runs a handful of complex instructions sequentially, very fast; a GPU runs thousands of simple instructions in parallel, which is exactly the shape of the matrix math behind neural networks. That's why training or running anything past a toy model is dramatically faster on a GPU than a CPU.

bash
# NVIDIA
nvidia-smi
 
# Install PyTorch with CUDA
uv pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124
python
import torch
print(f"CUDA available: {torch.cuda.is_available()}")
if torch.cuda.is_available():
    print(f"GPU: {torch.cuda.get_device_name(0)}")

On a Mac with an M-series chip, there's no CUDA, but PyTorch still gets GPU acceleration through Apple's Metal Performance Shaders (MPS) backend:

python
import torch
print(f"MPS available: {torch.backends.mps.is_available()}")

It won't outrun a discrete NVIDIA GPU, but it's a real step up from CPU for anything past a toy model.

No GPU at all? Most lessons run fine on CPU. For the training-heavy ones, use Google Colab or a cloud GPU instead of fighting local drivers.

Step 11: Verify Everything

Run the verification scripts:

bash
python phases/00-setup-and-tooling/01-your-machine-configured/code/verify.py
bash phases/00-setup-and-tooling/01-your-machine-configured/code/env_setup.sh

verify.py checks your Python-side stack end to end. env_setup.sh builds and verifies the shared base environment this whole course sits on top of.

Check: Build It0/33
1. What does CUDA provide for AI workloads?Define
Three snippets from the lesson where CUDA appears: installing PyTorch from the cu124 wheel index, printing torch.cuda.is_available() and the GPU name, and running nvidia-smi to see the driver's CUDA version.
2. What is WSL2, and why would a Windows user setting up AI tooling need it?Define
A Windows 11 laptop where PowerShell runs wsl --install -d Ubuntu-24.04, opening an Ubuntu-24.04 window in which uname -s prints Linux and apt update, apt install and the uv install script are typed.
3. What is a lockfile in the context of Python dependency management?Define
Terminal running uv pip compile pyproject.toml -o requirements.lock, then showing the file header, a count of 110 name==version lines, and the lines for numpy, matplotlib, jupyter and scikit-learn.
Real uv output for the lesson's pyproject.toml.
4. Which package manager does this lesson use for the Node.js/TypeScript toolchain?Define
Terminal for the Node.js toolchain: fnm install 22, fnm use 22, and a node command printing the Node version, followed by two commands whose tool name is hidden as three question marks. A card gives the TypeScript row of the course table with the package manager left as a question mark.
Only the node output is a real run. The fnm and hidden-tool lines are typed, not executed.
5. After running the rustup install script, what do you actually get access to?Define
Terminal on a fresh machine: ls of ~/.cargo/bin reports no such directory, the rustup install script is typed, and ls of the same folder is typed again with no output shown.
6. What is the purpose of uv in a Python AI project?Define
Terminal running uv: uv --version, uv venv creating .venv, then uv pip install numpy matplotlib reporting how many packages it resolved and installed with timings.
Real uv run on this machine, with the interpreter path edited and the middle of the install log cut.
7. According to Step 9, which language install is listed as optional and reserved for the math-heavy lessons?Define
Table of setup steps 7 to 10: Step 7 Node.js with pnpm, Step 8 Rust, Step 9 with its title hidden and marked Optional for the math-heavy lessons, and Step 10 GPU Setup.
8. What does pyproject.toml replace, according to Step 3?Define
A pyproject.toml showing the project name, version and a dependencies list, next to a note that this one file holds name and version, base dependencies and dependency groups, and a note that Step 3 says every Python project should have one.
9. In the lesson's terms, what is a transitive dependency?Define
Terminal: a pyproject.toml whose dependencies list names only requests, then uv pip install requests resolving 5 packages and installing certifi, charset-normalizer, idna, requests and urllib3.
Real uv output. The install command is typed by hand here instead of read from the file.
10. What does MPS refer to when you set up PyTorch on a Mac?Define
A MacBook with an Apple M-series chip, no NVIDIA card and no CUDA, next to the lesson's Python lines that print torch.backends.mps.is_available().
11. What does the term CUDA mismatch describe?Define
Two readouts side by side: the GPU driver reporting CUDA 11.8 through nvidia-smi and the PyTorch build reporting CUDA 12.4 through torch.version.cuda, joined by a dashed line with a question mark, above a Key Terms row for CUDA mismatch.
12. Why does the lesson recommend one virtual environment per course phase instead of a single environment for the whole curriculum?Explain
Folder tree of taibui-dev with one .venv at the root and a separate .venv inside each of the phase folders 04-neural-networks, 05-cnns, 08-transformers and 11-llm-apis, beside a list of the course phases.
13. Why does the lesson say to never commit `.venv/` itself to git, only the lockfile?Explain
Terminal in a project folder listing .venv, pyproject.toml, requirements.lock and train.py, with a note that the venv holds the four packages from pyproject.toml and that git init is next.
14. Why is mixing pip and conda in the same environment problematic?Explain
Terminal inside a conda environment named myproject: conda create, conda activate, conda install pytorch with CUDA 12.4, then pip install some-other-package and python train.py.
15. In the pyproject.toml example, what does the [project.optional-dependencies] table let you do?Explain
The lesson's pyproject.toml: project metadata, a base dependencies list of numpy, matplotlib, jupyter and scikit-learn, and a [project.optional-dependencies] table with a torch group and an llm group.
16. Why keep a lockfile alongside pyproject.toml?Explain
Two files from one project: pyproject.toml listing numpy>=1.26, matplotlib>=3.8, jupyter>=1.0 and scikit-learn>=1.4, and requirements.lock listing the same four with exact versions, in a lock file of 110 pinned lines.
Lock produced by a real uv pip compile.
17. Why is a GPU so much faster than a CPU for neural network math?Explain
A 2x3 matrix times a 3x2 matrix equals a 2x2 result with unknown entries, plus the four multiply-add expressions that make up each entry, and a line noting that a 1000 by 1000 product has 1,000,000 entries of 1,000 multiply-adds each.
18. On a machine where all seven core checks pass but PyTorch is not installed, how does verify.py's output end?Apply
Seven core checks listed in green as passing (Python, NumPy, Matplotlib, Jupyter, Git, Node.js, Rust cargo), the two GPU checks PyTorch and CUDA, and a terminal where importing torch raises ModuleNotFoundError before verify.py is run.
19. torch is installed but torch.cuda.is_available() returns False, and every core check passes. What does verify.py report?Apply
Core checks all passing, the two GPU checks PyTorch and CUDA listed, and a terminal where torch imports fine and torch.cuda.is_available() prints False before verify.py is run.
20. With Node 22, git and python3 3.12 installed but no cargo and no deno, what does verify.ts print and exit with?Apply
Table of the six probes in verify.ts with their kind and this machine's state: Node.js 20+ required with v22, tsx optional and not stated, Git required and installed, Python required with python3 3.12, cargo and Deno optional and not installed.
21. Node reports v18.19.0, and git and python3 3.12 both pass. What does verify.ts do?Apply
Table of the six probes in verify.ts with Node.js 20+ reporting v18.19.0, Git and Python passing, the rest not stated, and a terminal where node --version prints v18.19.0 before verify.ts is started.
22. In main.rs, uv is not installed, pnpm and julia are, and all five required tools pass. What does the summary show?Apply
Table of the eight checks in main.rs: Git, Python, Node.js, Rust rustc and Cargo as required and installed, uv as optional and not installed, pnpm and Julia as optional and installed.
23. In main.rs, python3 --version prints "Python 3.9.6" and every other required tool passes. What happens?Apply
Table of the five required checks in main.rs with Git, Node.js, rustc and Cargo installed and python3 --version printing 3.9.6, plus a terminal where python3 --version prints Python 3.9.6 before the compiled program is run.
24. You run env_setup.sh a second time, and .venv already exists in the repo root. What does it do?Apply
The repo root listing .git, .venv (created by the first run yesterday), phases, pyproject.toml and README.md, then the command that runs env_setup.sh from the lesson's code folder a second time.
25. After activating, env_setup.sh finds that `which python` returns /usr/bin/python. What does it do?Apply
A note that env_setup.sh has sourced .venv/bin/activate and printed Activated virtual environment, and a terminal where which python prints /usr/bin/python.
26. In the lesson's verification snippet, what does np.dot(a, a) print for a = np.array([1, 2, 3])?Apply
The lesson's verification snippet creating a = np.array([1, 2, 3]) and printing np.dot(a, a), with the vector a drawn twice as boxes 1, 2, 3 and the result left as a question mark.
27. Given the lesson's pyproject.toml, what does `uv pip install -e ".[llm]"` install?Apply
The lesson's pyproject.toml with its four base dependencies, a torch group and an llm group, followed by the command uv pip install -e with the llm group selected.
28. You run `python train.py` and get a ModuleNotFoundError for a package you're sure you installed yesterday. What's the most likely cause?Analyze
Terminal in a project folder containing .venv, pyproject.toml and train.py; python3 train.py ends with a Traceback and ModuleNotFoundError: No module named matplotlib. A note says matplotlib was installed yesterday with uv pip install.
Real traceback from a Python that cannot see the package, in a throwaway project.
29. nvidia-smi shows CUDA 11.8, but torch.version.cuda prints 12.4 and torch.cuda.is_available() is False. What is the diagnosis?Analyze
Terminal: nvidia-smi header showing CUDA Version 11.8, then torch.version.cuda printing 12.4 and torch.cuda.is_available() printing False.
Illustrative output built from the question's values. The nvidia-smi line is shortened to its version fields.
30. A teammate clones your repo, installs from pyproject.toml, and gets newer package versions than you, which break a script. What did the repo lack?Analyze
Two installs of the same repo: yours with numpy 1.26.4 where train.py runs, and a teammate's today with numpy 2.5.3 where train.py breaks, above the teammate's git clone and uv pip install -e . commands.
31. You're on a shared cluster where you can't install system-level packages, and a library's own install instructions insist on conda. Why reach for conda here instead of uv or pip?Design
A shared cluster terminal where sudo apt-get install is refused with a password is required message, and a library README whose Install section says conda create and conda install, with uv and pip also available.
Real sudo -n output for an account without admin rights. The -n flag makes sudo fail instead of asking for a password.
32. A later phase needs the Anthropic and OpenAI SDKs but no PyTorch. Which setup fits the lesson's layout?Design
Repo layout with a base .venv at the root, a PyTorch .venv in phases/04-neural-networks and a phases/11-llm-apis folder with no .venv yet, plus the torch and llm optional groups of pyproject.toml and a note that the phase needs the Anthropic and OpenAI SDKs but not torch.
33. You have a laptop with no GPU and reach a training-heavy lesson. Which approach does the lesson back?Design
Terminal on a laptop where nvidia-smi reports command not found, and a card saying the next lesson is a training run on a model past toy size and the laptop is CPU only.
Real nvidia-smi lookup on a machine without NVIDIA tools.

Use It

Your environment is now ready for every lesson in this course. Here's what you'll use where:

LanguageUsed InPackage Manager
PythonPhases 1-12 (ML, DL, NLP, Vision, Audio, LLMs)uv
TypeScriptPhases 13-17 (Tools, Agents, Swarms, Infra)pnpm
RustPhases 12, 15-17 (Performance-critical systems)cargo
JuliaPhase 1 (Math foundations)Pkg

If you'd rather script the whole base setup in one shot instead of following Step 2 by hand, run:

bash
bash phases/00-setup-and-tooling/01-your-machine-configured/code/env_setup.sh

This creates a .venv at the repo root with the core dependencies installed and verified. It's the same baseline every later phase builds on.

Author's Note

Every one of the mistakes in Step 6 is embarrassingly simple in isolation: forgot to activate a venv, let pip touch a conda env, installed something globally by accident. None of them are hard to understand. What makes them expensive is that they don't show up right away. They show up as a torch import error or a silent CPU fallback three lessons later, after you've completely forgotten you ever touched the environment. Spend the 75 minutes now. The alternative is spending an afternoon in week six wondering why your GPU "stopped working," when the real answer is that you never checked which python you were actually running.

Exercises

  1. Run the verification script(s) and fix any failures.
  2. Create a virtual environment for this course, install PyTorch, and confirm GPU access if you have one.
  3. Write a "hello world" in all four languages (Python, TypeScript, Rust, Julia) and run each one.
  4. Create a second virtual environment, install a different version of numpy in it, and confirm the two environments are isolated from each other.
  5. Write a pyproject.toml for a project that needs both PyTorch and the Anthropic SDK, using optional dependency groups.
  6. Deliberately install a package globally without activating a venv, notice where it lands, then uninstall it.

Key Terms

TermWhat people sayWhat it actually means
Virtual environment"A venv"An isolated directory containing a Python interpreter and packages, separate from the system Python
uv"The fast pip"A Rust-based Python package manager that also handles Python installs and virtual environments, with dependency resolution 10-100x faster than pip
Lockfile"Pinned dependencies"A file listing every package and its exact version, guaranteeing identical installs across machines
pyproject.toml"The new setup.py"The standard Python project configuration file, replacing setup.py/setup.cfg/requirements.txt
Transitive dependency"A dependency of a dependency"Package B depends on C; if you install A which depends on B, C is a transitive dependency of A
CUDA"GPU support"NVIDIA's parallel computing platform; lets PyTorch and TensorFlow run matrix operations across thousands of GPU cores
MPS"Mac GPU support"Apple's Metal Performance Shaders backend; how PyTorch uses the GPU on Apple Silicon Macs instead of NVIDIA CUDA
CUDA mismatch"My GPU isn't working"PyTorch was compiled for a newer CUDA version than your GPU driver supports

Code

Ships With