How to Install Python on Windows, macOS, and Linux: A Guide
Learn how to install Python 3 on Windows, macOS, and Linux. Follow our guide for official downloads, PATH setup, and terminal commands.

On this page
Python is free, open source, and works exactly the same way on Windows, macOS, and Linux: only the installation method changes. Here, you will find the procedure for each of the three systems, plus a couple of things that older guides don’t mention—like how to fix your PATH if you forgot it, or why you shouldn’t use the Python version already installed on your Mac.
Which Python version should you choose #
The official website often has several versions available at once. Generally speaking:
- If you are learning or starting a new project, download the latest stable version, which is at the top of the download page: currently, that’s the Python 3.14 series.
- If you are working on an existing project, first check which version your libraries require, as some packages take a few months to adapt to new releases.
Each version receives about two years of standard updates and then another three years of security fixes only, for five years in total. Staying on a version that is one or two years old isn’t an issue. However, avoid those that are end-of-life: currently, this includes Python 2 and all series up to and including 3.9.
How to install Python on Windows #
There are two ways on Windows: the Python install manager, which is the method currently recommended by the project, and the classic .exe installer, which is still available but is expected to be removed in version 3.16.
The recommended method: Python install manager #
- Open the Microsoft Store and search for “Python install manager,” or install it from the terminal using
winget install 9NQ7512CXL7T. - Upon first launch, an automatic configuration check will run: let it finish.
- Open Command Prompt or PowerShell and type:
py install 3.14
This command downloads and installs the latest version of the 3.14 series. To install a different series, change the number—for example, py install 3.12.
4. Verify that it works by typing:
py --version
The Python install manager requires Windows 10 or 11. If you prefer the traditional method, use the installer described below.
The classic method: the .exe installer #
Go to the Windows download page and download the latest stable Windows installer (64-bit). The 32-bit version is only intended for very old computers.
Run the file. On the first screen, check Add python.exe to PATH: this is the box almost everyone forgets, and without it, you won’t be able to run Python from the Command Prompt.
Click Install Now and wait for it to finish.
Open the Command Prompt and type
pyorpython. If a version number followed by>>>appears, you are inside the interpreter: typeexit()to exit.
Current versions, from 3.13 onwards, only work on Windows 10 or later. Windows 7 is no longer supported starting with the 3.9 series.
If you forgot to add Python to your PATH #
You can still fix it:
- Open the Start menu, search for “environment variables,” and choose Edit the system environment variables.
- Click Environment Variables, select Path under user variables, and click Edit.
- Add a new line with your installation folder (for example,
C:\Users\<nome utente>\AppData\Local\Programs\Python\Python314\) and another one with its subfolderScripts. - Confirm by clicking OK on all windows.
To check, open a new Command Prompt (already open ones won’t see the change) and type echo %PATH%: if the Python folder is listed, the system can find it. Alternatively, you can rerun the installer, choose Modify, and check the option to add Python to your environment variables.
How to install Python on macOS #
macOS comes with Python pre-installed, but that’s the version used by Apple’s own tools: an older version (currently 3.9 on macOS Tahoe) installed alongside Xcode command-line tools and which doesn’t get updated. For development, you’ll need your own version.
Using the official package #
- Go to the macOS download page and download the latest stable macOS installer, which works on both Apple Silicon and Intel-based Macs.
- Open the file
.pkgand follow the instructions. - Open the Terminal and check:
python3 --version
Using Homebrew #
If you already use Homebrew, installing Python through it is more convenient for keeping it up to date:
Don’t have Homebrew yet?
Go to the official Homebrew website, copy the installation command from the home page, and paste it into your Terminal. Finally, follow the “Next steps” instructions to add Homebrew to your PATH.
brew install python3
Homebrew installs the latest supported version (currently 3.14) and updates it with brew upgrade.
On Mac, the command is called python3, not python. If you want to type only python, add an alias to your shell configuration file, which since macOS Catalina has been zsh:
echo 'alias python="python3"' >> ~/.zshrc
source ~/.zshrc
How to install Python on Linux #
Almost all distributions already have Python 3 installed. Check with:
python3 --version
If it’s missing, install it using your distribution’s package manager:
sudo apt update
sudo apt install python3
This applies to Debian, Ubuntu, and its derivatives.
sudo dnf install python3
For Fedora and recent Red Hat distributions: yum still exists as an alias, but the command is now dnf.
On Debian and Ubuntu, pip and the virtual environment modules are separate packages: install them using sudo apt install python3-pip python3-venv.
Compiling Python from source code
You only need this if you require a version or configuration that your distribution doesn’t offer:
cd /tmp
wget https://www.python.org/ftp/python/3.14.7/Python-3.14.7.tgz
tar -xzf Python-3.14.7.tgz
cd Python-3.14.7
./configure
make
sudo make altinstall
Use make altinstall instead of make install: this way, you won’t overwrite the system Python—which the distribution uses for its own tools—and both versions can coexist.
After installation: pip and virtual environments #
Python comes with pip, the program used to install libraries. However, before installing anything, create a virtual environment for your project: a folder containing its own Python and libraries, kept separate from everything else. This allows two different projects to use different versions of the same library without interfering with each other.
# Crea l'ambiente nella cartella del progetto
python3 -m venv .venv
# Attivalo (macOS e Linux)
source .venv/bin/activate
# Attivalo (Windows, PowerShell)
.venv\Scripts\Activate.ps1
# Installa una libreria
pip install requests
On Windows, instead of python3 type py. To exit the virtual environment, simply use the command deactivate. On recent versions of Ubuntu and Debian, if you try to use pip install outside of a virtual environment, you will receive the externally-managed-environment error: this is intentional, and the solution is indeed to use a virtual environment.
FAQ #
What is the latest stable version of Python? #
Currently, it is the Python 3.14 series (the latest update is 3.14.7), and 3.13 still receives regular updates. Maintenance releases are released frequently, so when you go to install it, check the number on the official download page.
Is the 32-bit or 64-bit version better? #
64-bit: It is faster and doesn’t have the memory limits of the 32-bit version, which only makes sense for very old processors.
I already have Python on my Mac; why do I need to install another one? #
Because the built-in version is there for macOS and Apple’s tools; it isn’t intended for development and is several versions behind. Installing a separate version won’t interfere with your system and ensures you always have an up-to-date version.
Do I need to uninstall the old version before upgrading? #
No. Python versions coexist without any issues, and each project uses its own virtual environment created with a specific version. You can remove older versions once you no longer need them.
Can I have multiple versions of Python installed at the same time? #
Yes. On Windows, the Python install manager manages them side-by-side, and you launch them using py -3.12, py -3.14, and so on. On macOS and Linux, they reside in separate folders and are called using python3.12, python3.14, and similar commands.
