Setup

Python Trainer

Install Python on Windows, macOS, and Linux before starting Foundations

Start Here in 5 Minutes

Pick your OS, install Python, then run the verify step.

Should You Use python or python3?

Try python --version first. If it fails, switch to python3.

Recommended commands
python --version
python -m pip install --upgrade pip
python -m venv .venv

On This Page

Install Python on Windows

  1. Download Python 3 from python.org/downloads.
  2. Run installer and check Add Python to PATH.
  3. Open PowerShell and verify.
PowerShell
python --version
pip --version

Install Python on macOS

  1. Install from python.org or use Homebrew.
  2. If using Homebrew, run the commands below.
  3. Verify Python and pip.
Terminal
brew install python
python3 --version
pip3 --version

Install Python on Linux

  1. Use your distro package manager.
  2. Install Python 3, pip, and venv.
  3. Verify in your shell.
Debian/Ubuntu example
sudo apt update
sudo apt install -y python3 python3-pip python3-venv
python3 --version
pip3 --version

Verify Python Is Ready

Use whichever command works on your system.

Any shell
python --version || python3 --version
pip --version || pip3 --version

Expected result: Python 3.x.x and a pip version line.

Recommended First-Time Setup

  1. Upgrade pip in your user environment.
  2. Create a project folder and virtual environment.
  3. Activate the virtual environment and install packages there.

Windows (PowerShell)

PowerShell
python -m pip install --upgrade pip
mkdir python-trainer
cd python-trainer
python -m venv .venv
.\.venv\Scripts\Activate.ps1

macOS / Linux

Terminal
python3 -m pip install --upgrade pip
mkdir python-trainer
cd python-trainer
python3 -m venv .venv
source .venv/bin/activate

Common Issues

Command not found: python / pip

Restart your terminal after installation. On Windows, confirm PATH was enabled in the installer.

Try python3 and pip3 variants on macOS/Linux.

Permission denied while installing packages

Use a virtual environment instead of system-wide install. Avoid sudo pip.

PowerShell blocks script activation

Run this once in PowerShell as your user, then retry activation:

PowerShell
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

Next Step

Python is installed. Continue to your first interactive lesson.

Go to Foundations