Start a Python project the right way

Isolated environments, pinned dependencies and fast installs with venv or uv.

3 min5 stepsmacOS · Linux · Windows

  1. Option A: venv + pip

    Built into Python. Activate it in every new terminal.

    python3 -m venv .venv && source .venv/bin/activate
  2. Install what you need

    Or install from an existing requirements file.

    pip install
  3. Pin your versions

    Commit requirements.txt so others get the same setup.

    pip freeze > requirements.txt
  4. Option B: uv (faster)

    One tool for environments, packages and running scripts.

    uv init && cd
  5. Add packages with uv

    Recorded in pyproject.toml automatically.

    uv add

More guides