---
title: "How to install Python on Windows, macOS, and Linux"
description: "On Windows, the way you install Python has changed: the recommended tool is now the Python install manager."
url: https://sevalla.com/blog/install-python/
---

[Blog](https://sevalla.com/blog/)

# How to install Python on Windows, macOS, and Linux

On Windows, the way you install Python has changed: the recommended tool is now the Python install manager.

Updated: Nov 30, 2026·by Jeremy Holcombe

Python is a programming language that [developers](https://kinsta.com/blog/types-of-developers/) love for its versatility and simplicity. It's a great choice for web development, [data science](https://kinsta.com/blog/data-visualization-tools/), artificial intelligence, machine learning, and automation, from small scripts to large applications.

If you're new to programming, even installing Python can feel overwhelming. This guide walks you through installing the latest version of Python on Windows, macOS, and Linux, and checking that it works. At the time of writing, the latest version is Python 3.15.

## What is Python?

Python is a high-level, interpreted programming language created by Guido van Rossum and first released in 1991.

Python's design emphasizes readability, with a clean syntax that uses indentation instead of braces to structure code. That makes it easy to learn for beginners, and pleasant to use for experienced programmers.

Python comes with a large standard library, and the Python Package Index (PyPI) offers hundreds of thousands of third-party packages, so you can build almost anything without starting from scratch. Python runs on Windows, macOS, and Linux, and it's developed by an active community, with a new version released every year.

## Who uses Python?

Python is used across many professions and industries:

- **Software developers** use it to build applications, from command-line tools to desktop apps and backend services.
- **Data scientists and analysts** use it to clean, analyze, and visualize data, with libraries such as pandas and Matplotlib.
- **Machine learning and AI engineers** use it to train and run models, with libraries such as PyTorch and scikit-learn.
- **System administrators and DevOps engineers** use it to automate tasks, manage servers, and write deployment scripts.
- **Web developers** use frameworks such as [Django](https://kinsta.com/blog/django-vs-laravel/), [Flask](https://sevalla.com/blog/flask-vs-django/), and [FastAPI](https://sevalla.com/blog/fastapi/) to build web applications and APIs.
- **Researchers and scientists** use it to process data, run simulations, and build mathematical models.

Many well-known companies use Python too, including Instagram, whose backend is built on Django, Dropbox, Netflix, Spotify, and Reddit.

## Advantages of using Python

Python's popularity comes from a few key advantages:

1. **It's easy to learn.** Python's syntax is clear and concise, so beginners can start writing useful code quickly.
2. **It has a huge ecosystem.** Libraries for web development, data analysis, machine learning, automation, and much more are a `pip install` away.
3. **It's cross-platform.** The same Python code runs on Windows, macOS, and Linux, usually without changes.
4. **It has a strong community.** You'll find tutorials, answers, and libraries for almost any problem, and the language keeps improving every year.

## Before you install Python

You don't need much to install Python:

- **A supported operating system:** Python 3.15 supports Windows 10 and newer, and the python.org installer for macOS supports macOS 10.15 Catalina and newer. On Linux, any current distribution works.
- **Administrator access**, on macOS and Linux, to install software system-wide. On Windows, the Python install manager installs for your user account.
- **Basic familiarity with the command line,** since you'll check your installation in a terminal. If you're new to it, see our guide to [Python commands](https://sevalla.com/blog/python-commands/).
- **An internet connection** to download Python.

Python itself is small, and any computer from the last decade can run it. You'll need more memory and disk space only for heavy workloads, such as data science or machine learning.

### Python 2 vs Python 3

You might still see references to Python 2\. It reached its end of life in January 2020, and its last release was [Python 2.7.18](https://www.python.org/downloads/release/python-2718/). It no longer receives updates or security fixes, so always install Python 3\. All the instructions below install Python 3.

## How to install Python on Windows

On Windows, the way you install Python has changed: the recommended tool is now the Python install manager. It installs Python and keeps it up to date, and it can manage several Python versions side by side. The traditional installer is deprecated.

### Step 1: install the Python install manager

You can install the Python install manager in one of three ways:

- **Microsoft Store:** Open the Microsoft Store app, search for "Python install manager," and click **Install**.
- **python.org:** Go to the [Python downloads for Windows](https://www.python.org/downloads/windows/) page, download the Python install manager, and double-click the file to install it.
- **WinGet:** Open a terminal, such as PowerShell in Windows Terminal, and run:  
```  
winget install 9NQ7512CXL7T -e --accept-package-agreements --disable-interactivity  
```

If you installed Python with the old installer before, uninstall it first in **Settings** \> **Apps** \> **Installed apps**, especially the "Python Launcher," because the old launcher and the install manager both provide the `py` command.

### Step 2: install Python

Open a new terminal window and type:

```
python
```

If no version of Python is installed yet, the install manager downloads and installs the latest release automatically, then starts the Python shell. Type `exit` to leave it.

You can also install a specific version with the `py` command, and list the versions you have:

```
py install 3.15
py list
```

### Step 3: verify the installation

In the terminal, check the version:

```
python --version
```

You should see the version you installed, such as `Python 3.15.2`. You're ready to start writing Python on Windows.

The first time you run it, the install manager may also offer to run a configuration check, for example, to add its commands to your `PATH`. Accept the suggested changes, or run `py install --configure` later to check again.

## How to install Python on macOS

macOS doesn't include a current version of Python. It no longer ships Python 2, and the `python3` command you may find in the Terminal belongs to Apple's Command Line Tools, which install an older Python 3\. To get the latest version, install Python from python.org or with Homebrew.

### Step 1: check whether Python is installed

Open the **Terminal** app. You can find it with Spotlight (`Cmd` \+ `Space`) or in **Applications** \> **Utilities**. Then type:

```
python3 --version
```

If you see a recent version, such as `Python 3.15.2`, you're done. If you see an older version, or macOS asks you to install the Command Line Tools, continue with the next step.

### Step 2: download and run the installer

Go to the [Python downloads for macOS](https://www.python.org/downloads/macos/) page and download the macOS installer for the latest release. It's a `.pkg` file that runs natively on both Apple Silicon and Intel Macs.

Open the downloaded file and follow the steps: accept the license, keep the default install location, and enter your password when asked.

When the installation finishes, a Finder window opens the **Python 3.15** folder in **Applications**. Double-click **Install Certificates.command** in that folder. It installs the root certificates Python needs to make secure connections, for example, to download packages with pip.

Alternatively, if you use [Homebrew](https://brew.sh/), you can install Python with one command:

```
brew install python
```

### Step 3: verify the installation

Open a new Terminal window and type:

```
python3 --version
```

You should see the version you just installed. On macOS, use `python3` and `pip3`, since the `python` command may not exist.

You can also try IDLE, the simple editor that comes with Python. Open it from the **Python 3.15** folder in **Applications**, and type this in its shell:

```
print("Test message")
```

Press **Enter**, and `Test message` appears on the next line.

## How to install Python on Linux

Most Linux distributions come with Python 3 installed, because many system tools are written in it. But it's often not the latest version, and some parts, such as pip and the venv module, may be in separate packages.

### Step 1: check for an existing installation

Open a terminal and type:

```
python3 --version
```

If Python is installed, you'll see its version. Note that on many distributions, including Debian and Ubuntu, the command is `python3`, and `python` doesn't exist unless you install it.

### Step 2: install Python with your package manager

The easiest way to install Python on Linux is with your distribution's package manager.

On Debian, Ubuntu, and Linux Mint:

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

The extra packages add virtual environments and pip, which Debian and Ubuntu package separately. To also make the `python` command run Python 3, install `python-is-python3`.

On Fedora and other RPM-based distributions:

```
sudo dnf install python3
```

On Arch Linux:

```
sudo pacman -S python
```

The package manager installs the Python version your distribution provides, which may be a few releases behind the latest one. Don't remove or replace it, since your system's own tools depend on it.

### Step 3 (optional): build the latest Python from source

If you need a newer Python than your distribution provides, you can build it from the source code. This takes a few minutes and some extra packages. These steps work on Debian and Ubuntu:

1. Install the tools and libraries needed to build Python:  
```  
sudo apt update  
sudo apt install build-essential zlib1g-dev libncurses-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev libbz2-dev liblzma-dev wget  
```
2. Download the source code of the latest release from the [Python source releases](https://www.python.org/downloads/source/) page, and extract it:  
```  
wget https://www.python.org/ftp/python/3.15.2/Python-3.15.2.tgz  
tar -xf Python-3.15.2.tgz  
cd Python-3.15.2  
```
3. Configure, build, and install it:  
```  
./configure --enable-optimizations  
make -j "$(nproc)"  
sudo make altinstall  
```  
The `--enable-optimizations` flag makes Python run faster but makes the build take longer. `make -j "$(nproc)"` builds on all your CPU cores.

Use `make altinstall`, not `make install`. `altinstall` installs the new version as `python3.15`, next to your system Python, while `make install` would also overwrite the `python3` command, which can break system tools that depend on your distribution's Python.

### Step 4: verify the installation

Check the version with the command for the Python you installed:

```
python3 --version     # Your distribution's Python
python3.15 --version  # Python you built from source
```

## Other ways to install Python

Besides the official installers and package managers, two popular tools install and manage Python versions for you, on any operating system:

- **[uv](https://docs.astral.sh/uv/)** is a fast Python package and project manager. Once you install it, `uv python install 3.15` installs Python 3.15 for your projects, without touching your system Python.
- **[pyenv](https://github.com/pyenv/pyenv)** installs several Python versions on macOS and Linux and switches between them, for example, with `pyenv install 3.15`. On Windows, use the Python install manager or [pyenv-win](https://github.com/pyenv-win/pyenv-win).

These tools are especially useful when different projects need different Python versions. See our guide to [Python commands](https://sevalla.com/blog/python-commands/) for more on both.

## Summary

In this article, you installed Python on Windows with the Python install manager, on macOS with the python.org installer or Homebrew, and on Linux with your package manager or from source, and checked that it works in the terminal.

Now that Python is installed, it's time to start learning. Check out our [Python tutorials](https://sevalla.com/blog/python-tutorials/) and our guide to [Python commands](https://sevalla.com/blog/python-commands/), and bookmark [Python's official documentation](https://docs.python.org/3/).

When your Python app is ready to go live, you can deploy it from Git with Sevalla's [Application Hosting](https://sevalla.com/application-hosting/), which detects Python projects and installs their dependencies for you.

Share on:[Tweet](https://x.com/intent/post?text=I've just read this article "How to install Python on Windows, macOS, and Linux" on @sevalla%5Fhosting 's blog: https://sevalla.com/blog/install-python/ "x.com")[Reddit](https://www.reddit.com/submit?url=https://sevalla.com/blog/install-python&title=How to install Python on Windows, macOS, and Linux "Reddit")[HackerNews](https://news.ycombinator.com/submitlink?u=https://sevalla.com/blog/install-python&t=How to install Python on Windows, macOS, and Linux "HackerNews")

## Deep dive into the cloud!

Deploy your application, database, or static site in minutes.

[Get started](https://sevalla.com/signup/)
