Guide to installing Python on Windows, macOS, and Linux systems:
Installing Python on Windows
Step 1: Download Python
- Go to the official Python website: https://www.python.org/downloads/
- Click on Download Python 3.x.x (latest version)
Step 2: Run the Installer
- Double-click the downloaded
.exe
file - IMPORTANT: Check the box "Add Python to PATH"
- Click Install Now
Step 3: Verify Installation
Open Command Prompt and type:
python --version
Installing Python on macOS
Option 1: Using the Official Installer
- Visit: https://www.python.org/downloads/mac-osx/
- Download the latest macOS installer (
.pkg
file) - Run the installer and follow the instructions
Option 2: Using Homebrew (Recommended for Developers)
- Open Terminal
Install Homebrew (if not installed):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Install Python:
brew install python
Verify Installation:
python3 --version
Installing Python on Linux
Python usually comes pre-installed on most Linux distributions. If not, here’s how to install it:
For Debian/Ubuntu-based Systems:
sudo apt update
sudo apt install python3
For Fedora:
sudo dnf install python3
For Arch Linux:
sudo pacman -S python
Verify Installation:
python3 --version
Optional: Install pip (Python Package Manager)
Most installations include pip
by default, but if needed:
# On Windows/Mac/Linux if pip is missing
python -m ensurepip --upgrade