Complete Installation Guide

How to install Python on Windows, macOS and Linux

Choose your operating system, install Python from a trusted source, verify the interpreter and pip, and avoid the setup mistakes that cause PATH, alias and wrong-version problems later.

Windows 11 & 10macOSUbuntuLinux MintFedoraBeginner friendly

Choose your platform

You do not need to read every installation section. Jump directly to your operating system, then complete the shared verification steps near the end.

MissionInstall Python cleanly
PlatformsWindows · macOS · Linux
FinishVerify Python + pip

Before installing Python

  • Download installers only from Python.org or use your Linux distribution's package manager.
  • Do not remove the Python version supplied by macOS or Linux merely to install a newer version. System tools may depend on it.
  • For normal project work, use a virtual environment instead of installing every package globally.
  • After changing an installation or PATH setting, close and reopen the terminal before testing commands.
Windows 11 and Windows 10

Install Python on Windows

The current official Windows documentation recommends the Python install manager. It can install and manage Python runtimes while keeping the python and py commands consistent.

1. Download the official Windows installer

Open the official Python downloads page for Windows. Choose the current recommended installer or install manager for your PC. Most Windows 11 and Windows 10 computers use 64-bit Windows.

2. Run the installer

Open the downloaded file and approve the Windows security prompt. Complete the default setup. When the installer offers command or PATH integration, keep it enabled unless you manage Python through a custom development environment.

3. Install or confirm a runtime

Open Windows Terminal, PowerShell or Command Prompt. With the Python install manager available, the following command installs the current default runtime:

py install

To inspect the commands supported by your installed manager, run:

py help

4. Restart the terminal and verify

python --version py --version python -c "print('Python is working')"

If py works but python does not, do not reinstall immediately. That usually indicates a command alias or PATH issue rather than a missing interpreter.

Method checked against the current official Python documentation for Windows.

macOS

Install Python on macOS

Use the official universal installer from Python.org when you want a current Python version independent of the system-provided tools.

1. Download the macOS package

Open the official Python downloads page for macOS and download the current universal installer. The universal package supports modern Intel and Apple silicon Macs.

2. Complete the package installation

Open the downloaded .pkg file, continue through the installer and enter your Mac password when requested. The installation normally adds a Python 3 application folder and command-line tools.

3. Run the certificate helper when included

Some Python.org macOS installations include an Install Certificates.command helper inside the Python application folder. Run it if secure package downloads fail with certificate errors.

4. Verify in Terminal

python3 --version python3 -c "print('Python is working')" python3 -m pip --version

On macOS, python3 is the safest command to test. Do not assume that the plain python command points to the version you just installed.

Method checked against the official Python documentation for macOS.

Ubuntu

Install Python on Ubuntu

Ubuntu normally includes Python 3 because operating-system tools use it. The safest approach is to keep the system interpreter and install the development packages you need through APT.

1. Refresh the package list

sudo apt update

2. Install Python, pip and virtual-environment support

sudo apt install python3 python3-pip python3-venv

3. Verify the installation

python3 --version python3 -m pip --version python3 -c "print('Python is working')"

Do not replace /usr/bin/python3 with a manually downloaded build. Ubuntu components may expect the distribution-managed version.

APT is Ubuntu's recommended package-management path, and Ubuntu maintains release-specific Python versions.

Linux Mint

Install Python on Linux Mint

Linux Mint is based on Ubuntu and uses APT. Python 3 is commonly present already, so check it before installing additional packages.

1. Check the existing interpreter

python3 --version

2. Install the standard development components

sudo apt update sudo apt install python3 python3-pip python3-venv

3. Verify Python and pip

python3 --version python3 -m pip --version

Keep the Mint-managed Python installation intact. Use a virtual environment when a project needs packages or a version isolated from the operating system.

Fedora

Install Python on Fedora

Fedora includes Python 3 as part of the operating system. Use DNF to install or refresh the interpreter and pip instead of replacing system files manually.

1. Refresh package metadata

sudo dnf upgrade --refresh

2. Install Python and pip

sudo dnf install python3 python3-pip

3. Verify the setup

python3 --version python3 -m pip --version python3 -c "print('Python is working')"

Avoid using sudo pip for ordinary project dependencies. Create a virtual environment so project packages do not overwrite distribution-managed files.

Fedora's Python packaging guidance treats Python 3 as distribution-managed software.

Verify Python, pip and the active executable

A successful installer is not enough. Confirm that the terminal can locate the intended interpreter and that pip belongs to the same Python installation.

Windows versionpython --version and py --version
macOS and Linux versionpython3 --version
Windows executablewhere python
macOS/Linux executablewhich python3
Windows pippython -m pip --version
macOS/Linux pippython3 -m pip --version

Run a final test

python -c "print('Python is working')"

Use python3 instead of python on macOS and Linux when that is the installed command.

Create a clean virtual environment

A virtual environment gives each project its own packages and prevents dependency conflicts.

Windows

python -m venv .venv .venv\Scripts\activate

macOS and Linux

python3 -m venv .venv source .venv/bin/activate

After activation, install project packages with python -m pip install package-name. Run deactivate when finished.

Common problems after installation

Python opens Microsoft Store

Windows App Execution Aliases may be intercepting the command. Disable the misleading alias or confirm that the real Python executable appears earlier in PATH.

py works but python does not

The launcher can find an installed runtime, but the plain command is not registered correctly. Check aliases and PATH instead of installing another copy.

The terminal shows the wrong Python version

Multiple installations may be present. Use where python on Windows or which python3 on macOS/Linux to find the executable currently selected.

pip installs a package but Python cannot import it

pip may belong to another interpreter. Prefer python -m pip or python3 -m pip so package installation is tied to the Python command you intend to run.

Frequently asked questions

Should I install Python from the Microsoft Store?

The Store can work for basic use, but command aliases and multiple installations can become confusing. For a predictable development setup, follow the current official Python Windows installation guidance and verify both python and py.

Should I remove the Python already included with Linux?

No. Distribution tools may depend on it. Add project environments or an approved alternative version without deleting or replacing the system interpreter.

Do I need pip?

pip is required when you want to install third-party Python packages. Always verify it through the interpreter using python -m pip --version or python3 -m pip --version.

Which Python version should a beginner install?

Use the current stable version supported by the official installer or your operating system's maintained repositories. Avoid preview, alpha or release-candidate builds for normal learning and project work.