Installing Python on Windows, macOS, and Linux
Launch Sprint · Day 2
Install Python the right way
A clean Python install prevents path headaches, module conflicts, and security issues. Follow these OS-specific steps to get Python 3 running in under 10 minutes.
Windows · macOS · Linux
Supported OS
Beginner
Difficulty
~10 mins
Time
Before you begin
- Uninstall legacy Python 2.x versions if they exist.
- Decide whether to manage multiple versions—if yes, plan to use
pyenv(macOS/Linux) or the Windows Store. - Ensure you have administrator privileges to install system packages.
Download links
| Platform | Recommended source | Notes |
|---|---|---|
| Windows 10/11 | python.org installer or Microsoft Store | Use .exe to customize PATH and pip. |
| macOS | python.org universal installer or Homebrew brew install python@3.12 | macOS ships with Python 2—do not rely on it. |
| Linux | System package manager (apt, dnf, pacman) or pyenv | Most distributions bundle Python; keep the system version intact. |
Installation steps
Install Python 3.12
Use these high-level steps regardless of operating system.
Tools: Terminal, Internet connection
Supplies: ~150 MB disk space
Download the official installer
Grab the latest Python 3.x release from python.org or via your package manager.
Run the installer with PATH enabled
Windows: check "Add python.exe to PATH". macOS/Linux: ensure your shell sources the python3 binary (e.g., `/usr/local/bin`).
Verify with the terminal
Open a new shell and run `python --version` or `python3 --version`.
Install pip + venv tooling
The installer bundles pip. Verify with `python -m pip --version`. Optionally create a virtual environment via `python -m venv .venv`.
Windows quick reference
# Check Python + pip
python --version
python -m pip --version
# Create a starter project
mkdir python-playground
cd python-playground
python -m venv .venv
.venv\Scripts\activate
python -m pip install --upgrade pip
Always open a new terminal after installation so PATH changes take effect.
macOS / Linux quick reference
python3 --version
python3 -m pip --version
# Install via Homebrew (macOS)
brew install python@3.12
brew info python@3.12 # shows path for PATH export
# Install via apt (Ubuntu/Debian)
sudo apt update
sudo apt install python3 python3-pip python3-venv
Use `pyenv` when you need multiple Python versions without touching system Python.
Troubleshooting checklist
| Issue | Fix |
|---|---|
python command not found | Re-open terminal; confirm PATH includes installation directory; on Windows run installer again and ensure PATH checkbox is enabled. |
pip not recognized | Use python -m ensurepip --upgrade; for macOS with Homebrew, run brew reinstall python@3.12. |
| Multiple versions interfering | Explicitly call python3, manage versions with pyenv, or set aliases in your shell config. |
Next up in your learning path
Frequently Asked Questions
Do I need administrator rights?
Yes for system-wide installs. If you lack admin access, use the Microsoft Store version (Windows) or pyenv (macOS/Linux) inside your home directory.
Should I install Python via Anaconda?
Use the official installer for general development. Anaconda is great for data science, but it bundles large dependencies and differs from vanilla Python.
How do I upgrade later?
Download the new installer or run `brew upgrade python@3.12`. Always recreate virtual environments to pick up the new interpreter.