Windows and macOS using the installer

  1. Visit the official Python website.
  2. Download the latest stable version for your operating system.
  3. Follow the installation instructions: Check “Add Python to PATH” during installation.

macOS using Homebrew

brew install python

Linux

Install via your package manager

sudo apt install python3

Verify installation in a terminal or command prompt:

python --version