You can install Python on Windows, macOS, or Linux in a few steps, but the correct method depends on the operating system.

This guide covers Python Install Manager on Windows, the official macOS package, and the standard package-manager commands for Ubuntu, Debian, Fedora, and Arch Linux. It also shows how to verify Python and pip and create a project-specific virtual environment.

Quick Answer

Windows

Install Python Install Manager from python.org or Microsoft Store. Then open Windows Terminal and run:

py install default
python --version
py -m pip --version

macOS

Download the current macOS .pkg installer from python.org. Complete the installer and verify it in Terminal:

python3 --version
python3 -m pip --version

Ubuntu or Debian

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

The exact Python version depends on the operating system and distribution repository currently installed on your computer.

Video: Install Python on Windows, macOS, and Linux

The video below shows the installation steps, version checks, pip verification, and virtual-environment setup on each operating system.

install Python on Windows macOS and Linux
Python can be installed through the official installer or the operating system’s package manager.

1. Check Whether Python Is Already Installed

Before downloading anything, check whether Python is already available and which executable the terminal is using.

Windows

python --version
py --version
py list
where python

macOS and Linux

python3 --version
which python3

A result such as Python 3.x.x confirms that a Python 3 interpreter is available. I also check the executable path when more than one Python installation may exist.

2. Install Python on Windows

The current Windows method uses Python Install Manager, which manages Python runtimes and provides the python and py commands.

  1. Open the official Python downloads page.
  2. Download Python Install Manager, or install it through Microsoft Store.
  3. Complete the installation and reopen Windows Terminal.
  4. Install the current default Python runtime:
py install default

List installed runtimes with:

py list

To install a specific supported version, replace the example with the version required by the project:

py install 3.14

See the official Python on Windows documentation.

3. Verify Python on Windows

Open a new Windows Terminal window and run:

python --version
py --version
py -m pip --version

These commands confirm that the interpreter and pip are available. In support work, I verify both instead of assuming that a successful installer window means the terminal configuration is correct.

verify Python installation on Windows using the version command
Checking the installed Python version from a Windows terminal.

4. Fix “Python Is Not Recognized” on Windows

If Windows cannot find the python command:

  1. Close every open terminal window and open a new one.
  2. Run py --version.
  3. Run py list to confirm that a runtime is installed.
  4. Run py install default if no runtime is listed.
  5. Check Windows App execution aliases and the path reported by where python.

If py works but python does not, continue with py while checking aliases. Reinstalling immediately is usually unnecessary.

5. Install Python on macOS

Python.org provides a signed and notarized universal .pkg installer for compatible Intel and Apple Silicon Macs.

  1. Open the official Python downloads page for macOS.
  2. Download the current universal installer.
  3. Open the package and complete the installer.
  4. Enter the administrator password when requested.
install Python on macOS using the official package installer
Installing the official Python package on macOS.

Complete the Certificate Setup

After installation, open the Python folder in Applications and run:

Install Certificates.command

Verify the installation:

python3 --version
python3 -m pip --version
which python3

See the official Python on macOS documentation.

6. Install Python on Linux

Many distributions already include Python 3. Check first:

python3 --version

Ubuntu and Debian

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

Fedora

sudo dnf install python3 python3-pip

Arch Linux

sudo pacman -Syu python python-pip

7. Verify Python and pip

Run pip through the Python interpreter so the package command is tied to the expected installation.

Windows

py -m pip --version

macOS and Linux

python3 -m pip --version

The output shows both the pip version and the Python installation it belongs to. This is more reliable than calling pip without checking the interpreter.

8. Create a Virtual Environment

A virtual environment keeps each project’s packages separate from the operating-system Python and from other projects.

Windows

mkdir python-project
cd python-project
py -m venv .venv
.venv\Scripts\activate

macOS and Linux

mkdir python-project
cd python-project
python3 -m venv .venv
source .venv/bin/activate

After activation, the terminal normally shows (.venv). I create the environment before installing project packages because it prevents version conflicts and accidental changes to the system Python.

Upgrade pip inside the active environment:

python -m pip install --upgrade pip

See the official Python Packaging virtual environment guide.

9. Common Python Installation Problems

Problem What to Check
Python command not found Restart the terminal, try the platform-specific command, and confirm that the installation completed.
py works but python does not Use py on Windows and review Python Install Manager aliases and PATH settings.
pip command not found Use py -m pip on Windows or python3 -m pip on macOS and Linux.
Externally managed environment Create a virtual environment instead of installing packages globally into the Linux system Python.
Wrong Python version runs Check py list, where python, which python3, and the active virtual environment.
ModuleNotFoundError Confirm that the package was installed into the same interpreter or virtual environment used to run the script.
macOS SSL certificate error Run Install Certificates.command from the installed Python folder in Applications.

Frequently Asked Questions

What is the easiest way to install Python on Windows?

Install Python Install Manager from python.org or Microsoft Store, then run py install default.

Should I use python or python3?

Use python or py on Windows and python3 on macOS and Linux. Inside an active virtual environment, use python.

Does Python include pip?

Official Windows and macOS installations normally provide pip. Linux distributions may package it separately.

Why should I use a virtual environment?

It isolates project dependencies and prevents one project from changing another project or the operating-system Python environment.

Can multiple Python versions be installed?

Yes. Check the executable path and active virtual environment so the correct interpreter is used.

Summary

To install Python correctly, use Python Install Manager on Windows, the official python.org package on macOS, and the distribution package manager on Linux.

Verify the installation with:

Windows

python --version
py -m pip --version

macOS and Linux

python3 --version
python3 -m pip --version

Create a virtual environment before installing project packages. This keeps the setup predictable and avoids conflicts with other projects or the operating-system Python.

For more Windows setup and troubleshooting articles, visit the SupportSolved Windows guides.

Leave a Comment

E-posta adresiniz yayınlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir