Before you write a single line of code, you need Python actually running on your machine — and running correctly. This guide covers how to install Python on Windows, Mac, and Linux, plus the setup steps that trip up almost every beginner: PATH configuration, version conflicts, and picking the right installer for your operating system.
Introduction: Before You Install
It's tempting to just grab the first installer you find and click through it. Don't. A sloppy Python setup is one of the most common reasons beginners get stuck before they've even written "Hello, World." Two problems show up constantly:
Version conflicts — ending up with two or three different Python versions on the same machine, none of which behave the way tutorials expect.
PATH issues — installing Python correctly, but your terminal still can't find it because the system doesn't know where to look.
Getting this right the first time saves you hours of confusion later.
Checking if Python is already installed
Many systems — especially Mac and Linux — already have some version of Python sitting on them. Before you install anything, check what's there. Open a terminal and run:
# Try this first
python --version
# If that doesn't work, try this instead
python3 --version
If you get a version number back, Python exists on your system. If you get an error, you're starting from scratch — which is fine.
The current stable release
As of 2026, Python 3.14 is the recommended installation for new setups. It's the current stable branch, actively maintained, and it introduced a new installation system (more on that in the next section) that makes managing versions considerably less painful than it used to be.
With that groundwork out of the way, let's walk through how to install Python on Windows, Mac, and Linux — starting with Windows.
Installing Python on Windows
Windows doesn't ship with Python built in, so you have a few installation routes to choose from.
Option 1: Microsoft Store (Python Install Manager)
This is the recommended install method for Python 3.14 and later. Installing through the Microsoft Store gives you the Python Install Manager, a tool that handles automatic updates and lets you manage multiple Python versions without manually juggling installers.
To install it:
Open the Microsoft Store and search for "Python Install Manager."
Click Get and let it download.
Once installed, open a terminal (PowerShell or Command Prompt) and confirm it worked:
python --version
The Store version installs into your user folder, so you don't need admin rights, and it comes with the py launcher, pip, and IDLE included.
Option 2: Traditional installer from python.org
This is the older, "legacy" method — still fully functional, but being phased out in favor of the Install Manager (it won't be produced at all starting with Python 3.16). If you go this route:
Go to python.org/downloads and grab the Windows installer for the latest 3.14.x release.
Run the
.exefile.
Critical step: Add Python to PATH
Whichever installer you use, there's one checkbox that matters more than any other: "Add Python to PATH." If you skip this, Windows won't know where to find the python command, no matter how correctly Python itself installed. Check that box before clicking install.
Fixing "python is not recognized"
If you open a terminal after installing and see:
'python' is not recognized as an internal or external command
it almost always means PATH wasn't set correctly. Two fixes:
Reinstall and make sure "Add Python to PATH" is checked this time.
Manually add it: search "Environment Variables" in the Start menu, edit the PATH variable under your user account, and add the folder where Python was installed (something like
C:\Users\YourName\AppData\Local\Programs\Python\Python314\).
Close and reopen your terminal after making changes — PATH updates don't apply to already-open windows.
Optional: WSL (Windows Subsystem for Linux)
If you'd rather work in a Linux-style environment without leaving Windows, WSL lets you run a real Linux distribution (like Ubuntu) alongside your normal Windows setup. Once WSL is installed, you install Python inside it exactly the way you would on native Linux — see Section 4 below.
Installing Python on macOS
Macs come with Python already on them, but don't be tempted to use it for development.
Why not to use the pre-installed system Python
macOS ships with a python3 command tied to Apple's Command Line Tools. It exists to support internal Apple and third-party tooling — it's often an older version, and modifying or removing it can break parts of the operating system. Treat it as off-limits and install your own separate copy instead.
Official installer from python.org (.pkg file)
The most straightforward approach:
Go to python.org/downloads and download the macOS installer — it'll be a
.pkgfile.Double-click it and follow the installation wizard.
Open Terminal and confirm:
python3 --version
Alternative: Homebrew method
If you already use Homebrew (or plan to), it's a clean way to install and later upgrade Python:
# Install Python via Homebrew
brew install python
# Confirm the install
python3 --version
Homebrew keeps its own Python separate from the system version and makes future upgrades a one-line command (brew upgrade python).
Use python3, not python
On macOS, the bare python command may not exist at all, or it may point to something outdated. Get in the habit of typing python3 explicitly — that's the command tutorials and most documentation assume you're using on a Mac.
Installing Python on Linux
Linux is the friendliest of the three when it comes to Python — most distributions ship with some version of Python 3 already installed.
Checking your pre-installed version
python3 --version
If it's recent enough for what you're doing, you may not need to install anything. If you need a newer version, your distro's package manager is the way to go.
Installing or upgrading via package manager
On Ubuntu/Debian, using apt:
# Update your package index first
sudo apt update
# Install Python 3
sudo apt install python3
On Fedora, using dnf:
sudo dnf install python3
Both commands install a stable, distro-supported version of Python 3. If you need a specific newer version not available in your default repositories, you may need to add a PPA (Ubuntu) or a third-party repo (Fedora), or build from source — but for most beginners, the default package is enough to get started.
Installing pip separately
Some minimal Linux installations don't bundle pip (Python's package installer) by default. If pip3 --version returns an error, install it separately:
# Ubuntu/Debian
sudo apt install python3-pip
# Fedora
sudo dnf install python3-pip
Verifying Installation & Setting Up a Virtual Environment
Once Python is installed on your OS of choice, confirm it's working correctly and set up your first virtual environment — a step you shouldn't skip, even as a beginner.
Version check, all three OSes
# Windows
python --version
# macOS
python3 --version
# Linux
python3 --version
Why virtual environments matter
Every Python project tends to need its own set of installed packages, often at different versions than other projects on the same machine. Without isolation, you end up with conflicting dependencies — Project A needs one version of a library, Project B needs another, and installing one breaks the other. A virtual environment gives each project its own self-contained Python setup, so nothing steps on anything else.
Creating and activating a venv
Windows:
# Create the environment
python -m venv myenv
# Activate it
myenv\Scripts\activate
macOS/Linux:
# Create the environment
python3 -m venv myenv
# Activate it
source myenv/bin/activate
Once activated, your terminal prompt will usually show the environment name, confirming you're working inside it. Any packages you install with pip from this point on stay isolated to this project.
What's next
With Python installed and a virtual environment set up, the next logical step is picking an editor. Visual Studio Code, paired with its official Python extension, is a solid free option for beginners — it adds debugging, linting, and autocomplete support without much configuration. From here, you're ready to start writing actual code instead of fighting your setup.