Lesson 2 / 49

Install Python

Install Python 3.10 or newer and create an isolated virtual environment for each project.

By · 15 years in web development · Updated 1 Oct 2026

Check / install (macOS, Linux)

You want 3.10 or newer. If the first command fails, run the install line for your system.

python3 --version

# Install on macOS (Homebrew):
brew install python

# Install on Ubuntu / Debian:
sudo apt install python3 python3-venv python3-pip

Check / install (Windows)

In PowerShell. If it says Python isn't found, install it from python.org and tick "Add python.exe to PATH".

py --version

Virtual environment (macOS, Linux)

Keep each project's packages isolated.

python3 -m venv .venv
source .venv/bin/activate
pip install requests

Virtual environment (Windows)

The same steps in PowerShell.

py -m venv .venv
.venv\Scripts\Activate.ps1
pip install requests