---
title: "How to Install Python on Windows, macOS, and Linux: A Guide"
description: "Learn how to install Python 3 on Windows, macOS, and Linux. Follow our guide for official downloads, PATH setup, and terminal commands."
url: "https://www.alemasone.com/en/how-to-install-python-windows-macos-linux/"
language: "en"
published: 2023-12-29
updated: 2026-09-12
categories: ["Programming and Development"]
translations:
  it: "https://www.alemasone.com/it/come-installare-python/"
  es: "https://www.alemasone.com/es/como-instalar-python-windows-macos-linux/"
  fr: "https://www.alemasone.com/fr/installer-python-windows-macos-linux/"
  pt: "https://www.alemasone.com/pt/como-instalar-python-windows-macos-linux/"
  de: "https://www.alemasone.com/de/python-installieren-windows-macos-linux/"
---

# How to Install Python on Windows, macOS, and Linux: A Guide

To install Python on Windows today, you can use the **Python install manager** from the Microsoft Store (or the classic .exe installer, making sure to check the **Add python.exe to PATH** box). On macOS, you have the official package or Homebrew; on Linux, you use your distribution's package manager. The latest stable version is **3.14**.

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

1. Open the **Microsoft Store** and search for "Python install manager," or install it from the terminal using `winget install 9NQ7512CXL7T`.
2. Upon first launch, an automatic configuration check will run: let it finish.
3. Open **Command Prompt** or **PowerShell** and type:

```powershell
   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:

```powershell
   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

1. Go to the Windows [download page](https://www.python.org/downloads/windows/) and download the latest stable **Windows installer (64-bit)**. The 32-bit version is only intended for very old computers.
2. 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.

3. Click **Install Now** and wait for it to finish.
4. Open the Command Prompt and type `py` or `python`. If a version number followed by `>>>` appears, you are inside the interpreter: type `exit()` 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:

1. Open the Start menu, search for "environment variables," and choose **Edit the system environment variables**.
2. Click **Environment Variables**, select **Path** under user variables, and click **Edit**.
3. Add a new line with your installation folder (for example, `C:\Users\<nome utente>\AppData\Local\Programs\Python\Python314\`) and another one with its subfolder `Scripts`.
4. 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

1. Go to the macOS [download page](https://www.python.org/downloads/macos/) and download the latest stable **macOS installer**, which works on both Apple Silicon and Intel-based Macs.
2. Open the file `.pkg` and follow the instructions.
3. Open the **Terminal** and check:

```bash
   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](https://brew.sh/), 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.

```bash
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**:

```bash
echo 'alias python="python3"' >> ~/.zshrc
source ~/.zshrc
```

## How to install Python on Linux

Almost all distributions already have Python 3 installed. Check with:

```bash
python3 --version
```

If it's missing, install it using your distribution's package manager:

```bash
sudo apt update
sudo apt install python3
```

This applies to Debian, **Ubuntu**, and its derivatives.

```bash
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:

```bash
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.

```bash
# 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](https://www.python.org/downloads/).

### 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.
