# How to install Python on Windows, Linux and macOS

If you want to install Python, the easiest way is to use the official installation packages of the popular [scripting language](https://www.ionos.com/digitalguide/websites/web-development/what-are-scripting-languages/ "What are scripting languages?"). You can choose between different older and newer versions for various platforms. We’ll show you how to find the right edition to install and set up Python on your system.

## What do you need to set up Python?

If you want to work with [Python](https://www.ionos.com/help/hosting/python/what-is-python/ "What is Python? — IONOS Help"), you need two things: a [code editor](https://www.ionos.com/digitalguide/websites/web-development/code-editors/ "Code editors"), which ideally offers syntax highlighting, as well as the **appropriate version of Python** for the respective system and purpose. Your device doesn’t have to fulfil any special hardware or software requirements to install Python.

When deciding on a version, two questions in particular need to be answered:

1. Which **operating system** do you want to use Python on?
2. What’s the **purpose** of your programming efforts?

In principle, you have great freedom in the choice of platform. The [open-source](https://www.ionos.com/digitalguide/server/know-how/what-is-open-source/ "What is open source?") language is available for Windows, Linux and macOS. Depending on the system, however, a different installation package must be chosen.

The background for the use or installation of Python therefore plays a role because different versions are recommended depending on the intended use. For example, if you want to **learn to program with Python**, you can simply install the current version of Python. If you are **programming a specific application** and want to ensure compatibility with third-party modules, it’s often better to use older versions. Therefore, before even setting up Python, find out which version is best suited to your project.

---

### Tip

Do you want to take your first steps with Python? Learn the best tips and tricks for beginners in our detailed [Python tutorial](https://www.ionos.com/digitalguide/websites/web-development/python-tutorial/ "Python tutorial").

---

## Where can you download Python?

There are various options for downloading and setting up Python for different platforms. However, the best place to download all the different versions is, without doubt, the [official Python website](https://www.python.org/downloads/ "python.org: Download Center"). Here you can find **current and older versions**, **Docker images** and **development versions in the test phase** for Windows, Linux/UNIX and macOS, or other platforms such as iOS, IBM i, AIX or Solaris.

Alternatively, you can download Python, which is one of the most popular [internet programming languages](https://www.ionos.com/digitalguide/websites/web-development/web-programming-languages/ "Web programming languages"), in other ways. Users of Linux or macOS, for example, can also obtain the installation files directly via the package manager. To install Python on newer Microsoft operating systems such as Windows 10 or 11, you can use the Microsoft Store. This is installed by default and has various Python versions available for direct download.

---

### Tip

Are you using Python to set up your own web project or run a Python-based website? With [web hosting](https://www.ionos.com/hosting/web-hosting "Web hosting by IONOS") plans from IONOS, you’ve already got the right hosting environment with domain and SSL / TLS certificate.

---

## Installing and setting up Python on Windows: How it works

Installing Python on a Microsoft system can be done in just a few steps. The only thing to note is that newer **versions, from Python 3.9.x** onwards, only run on Windows 8 or higher.

### Step 1: Download the appropriate installation package

On the official [Python website](https://www.python.org/downloads/windows/ "python.org: Windows releases"), you’ll find all relevant releases of Python 2 and Python 3 for Windows. For practice or work purposes, downloading a **“stable” version** is recommended.

With all download packages, you have the choice between **32- and 64-bit**. Choose the variant that suits your system architecture. Use the “**Windows installer**” for an ordinary installation (recommended for beginners).

---

### Note

The alternative “Windows embeddable package” allows you to unpack the Python program files without installation. The available “**pre-releases**” are language versions that are still in the testing phase.

---

By clicking on the respective link, you’ll start the download.

[![Image: Screenshot of Python Windows download page](https://www.ionos.com/digitalguide/fileadmin/_processed_/6/9/csm_python-windows-downloadseite_5817a2b68b.webp "Screenshot of Python Windows download page")](https://www.ionos.com/digitalguide/fileadmin/DigitalGuide/Screenshots_2023/python-windows-downloadseite.jpg) Screenshot of Python Windows download page. Source: https://www.python.org/downloads/windows/       ###  Step 2: Install Python

Start the Python installation by double-clicking the downloaded file. In the opened installation assistant, keep the checkmark in the “**Install launcher for all users**” checkbox. Also, check “**Add Python x.x to PATH**” so that you can use the programming language directly from the command prompt. Then click “**Install now**”.

[![Image: Install Python for Windows](https://www.ionos.com/digitalguide/fileadmin/_processed_/f/3/csm_python-installieren-unter-windows_bb897921d0.webp "Install Python for Windows")](https://www.ionos.com/digitalguide/fileadmin/DigitalGuide/Screenshots_2023/python-installieren-unter-windows.jpg) Install Python for Windows       The installation starts immediately and only takes a few seconds. You’ll see a corresponding success message, including another configuration option. If you select the “**Disable path length limit**” button, it’s then possible for Python and other programs to bypass the 260-character maximum path length limit if necessary.

However, you can complete the installation and setup of Python without enabling this option by clicking “**Cancel**”.

[![Image: Python installation assistant after successful installation](https://www.ionos.com/digitalguide/fileadmin/_processed_/d/6/csm_python-installationsassistent-nach-erfolgreicher-installation_fbda032116.webp "Python installation assistant after successful installation")](https://www.ionos.com/digitalguide/fileadmin/DigitalGuide/Screenshots_2023/python-installationsassistent-nach-erfolgreicher-installation.jpg) Python installation assistant after successful installation       ###  Step 3: Run Python

If you want to run Python now, you can use IDLE (Integrated Development and Learning Environment), the **integrated development environment of Python**. This is automatically installed when you set up the scripting language.

To do this, open the **Windows search function** and type “**IDLE**”. Via the matching search result, you start the IDLE shell and can start programming with Python.

[![Image: IDLE shell: Simple print command](https://www.ionos.com/digitalguide/fileadmin/_processed_/0/5/csm_idle-shell-einfacher-print-befehl_eedba63978.webp "IDLE shell: Simple print command")](https://www.ionos.com/digitalguide/fileadmin/DigitalGuide/Screenshots_2023/idle-shell-einfacher-print-befehl.jpg) IDLE shell: Simple print command       ---

### Tip

Are you still looking for the right web address? Find the right [domain](https://www.ionos.com/domains/domain-names "Buy a domain with affordable registration at IONOS") for your web project with the help of IONOS and benefit from advantages like an SSL / TLS certificate and a mailbox.

---

## How to install and set up Python for Linux step by step

With Linux distributions, you install Python conveniently **via the terminal** — if the scripting language is not already installed on the system. For example, Ubuntu 20.04 and later versions of the derivative come with Python 3.9 by default. Read the steps below to find out if **Python is already installed** and how to install it manually on Linux if not. As an example, we use Ubuntu 22.04 in this case.

### Step 1: Check the current Python installation

Open the terminal and enter this command:

```none
python3 --version
```

In the following line, Ubuntu automatically presents the current Python 3 version if the programming language is already installed.

[![Image: Ubuntu terminal: Check Python version](https://www.ionos.com/digitalguide/fileadmin/_processed_/b/0/csm_Ubuntu-terminal-check-python-version_bd242c96c9.webp "Ubuntu terminal: Check Python version")](https://www.ionos.com/digitalguide/fileadmin/DigitalGuide/Screenshots_2023/Ubuntu-terminal-check-python-version.jpg) Ubuntu terminal: Check Python version       ###  Step 2: Install Python

If no version of Python is installed yet, you can always initiate the installation using the **package management system apt**. First, update the package manager with the following command:

```none
sudo apt update
```

Then, install Python using this command:

```none
sudo apt install python3
```

[![Image: Manual Python 3 installation in Ubuntu terminal](https://www.ionos.com/digitalguide/fileadmin/_processed_/7/9/csm_Manual-python-3-installation-in-ubuntu-terminal_c64b8ecc9e.webp "Manual Python 3 installation in Ubuntu terminal")](https://www.ionos.com/digitalguide/fileadmin/DigitalGuide/Screenshots_2023/Manual-python-3-installation-in-ubuntu-terminal.jpg) Manual Python 3 installation in Ubuntu terminal       ---

### Note

To install selected versions of the scripting language on Linux, you need to obtain and unpack the appropriate installation package from the official homepage.

---

### Step 3: Run Python

Once Python is set up, you can **use the programming language at any time from the terminal**. To do so, simply enter the following command:

```none
python3
```

## How to install Python on macOS devices

Apple operating systems have come with Python preinstalled for a long time, however, never with a version newer than Python 2.7. Installing a newer Python variant is therefore strongly recommended, even if your system already has a version. The best way is via the **Homebrew package manager**, which has to be installed first.

### Step 1: Install Homebrew

Start the terminal (accessible via the search function, for example) and call up the [Homebrew official website](https://brew.sh/ "Homebrew website"). Copy the command shown and paste it into the terminal. Run the command and enter your password and the Homebrew installation will begin.

[![Image: Screenshot of the Homebrew website](https://www.ionos.com/digitalguide/fileadmin/_processed_/3/7/csm_screenshot-of-the-homebrew-website_38a5f13c54.webp "Screenshot of the Homebrew website")](https://www.ionos.com/digitalguide/fileadmin/DigitalGuide/Screenshots_2023/screenshot-of-the-homebrew-website.jpg) Screenshot of the Homebrew website. Source: https://brew.sh/       After successful installation, you’ll find two more commands under “**Next steps**”, both of which you should also run. In this way, you **add Homebrew to the PATH environment variable** to be able to use the package manager from the command line.

### Step 2: Install Python

Once Homebrew is installed, you can set up Python. To do this, enter the following command in the terminal:

```none
brew install python3
```

### Step 3: Run Python

As with Linux/UNIX, you can now run Python from the terminal at any time by typing the following command:

```none
python3
```

---

### Tip

Do you want to delve deeper into programming with Python? In **other articles** in the Digital Guide, you can learn everything about the most important [Python operators](https://www.ionos.com/digitalguide/websites/web-development/python-operators/ "Python operators"), the similarities and differences between [Python and PHP](https://www.ionos.com/digitalguide/websites/web-development/php-vs-python/ "PHP vs. Python") or [how to fix typical Python errors](https://www.ionos.com/digitalguide/websites/web-development/troubleshooting-common-python-problems/ "Troubleshooting common Python problems") and more.

---


This is a markdown version of: [https://www.ionos.com/digitalguide/websites/web-development/install-python/](https://www.ionos.com/digitalguide/websites/web-development/install-python/) for AI/LLM consumption.