Virtual Environment
An isolated Python install with its own packages and versions.
- Built-in: python -m venv. Alternatives: conda, uv.
- Activating swaps the active python and pip.
- Non-negotiable for reproducible ML setups.
When to use: Every ML project; isolating dependencies per project.
Example: python -m venv .venv && .venv\Scripts\activate (Win) or source .venv/bin/activate (Mac/Linux).