Languages

Install Python and start a project

Install Python 3, then create a virtual environment so each project keeps its own packages.

Tested on macOS 26 Tahoe · Oct 2026
Tested on Ubuntu 24.04 · Oct 2026
Tested on Windows 11 24H2 · Oct 2026
Fill these in once
  1. Install Python
    Terminal
    brew install python
  2. Make a project folder with its own environment
    Terminal
    mkdir my-project && cd my-project
    python3 -m venv .venv
    source .venv/bin/activate

    Your prompt now starts with (.venv). Run deactivate to leave.

Check it worked

  1. Check the version
    Terminal
    python3 --version
Undo it
  1. Uninstall Python
    Terminal
    brew uninstall python
  1. Install Python with pip and venvNeeds sudo
    Terminal · Ubuntu / Debian
    sudo apt install -y python3 python3-pip python3-venv
  2. Make a project folder with its own environment
    Terminal · Ubuntu / Debian
    mkdir my-project && cd my-project
    python3 -m venv .venv
    source .venv/bin/activate

    Your prompt now starts with (.venv). Run deactivate to leave.

Check it worked

  1. Check the version
    Terminal · Ubuntu / Debian
    python3 --version
  1. Install Python
    PowerShell
    winget install Python.Python.3.13

    Close and reopen PowerShell afterwards.

  2. Make a project folder with its own environment
    PowerShell
    mkdir my-project; cd my-project
    py -m venv .venv
    .venv\Scripts\Activate.ps1

    If scripts are blocked, run Set-ExecutionPolicy -Scope CurrentUser RemoteSigned once.

Check it worked

  1. Check the version
    PowerShell
    py --version
Undo it
  1. Uninstall Python
    PowerShell
    winget uninstall Python.Python.3.13