If you want to install Python, the easiest way is to use the official in­stall­a­tion packages of the popular scripting language. 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.

Cheap domain names – buy yours now
  • Free website pro­tec­tion with SSL Wildcard included
  • Free private re­gis­tra­tion for greater privacy
  • Free Domain Connect for easy DNS setup

What do you need to set up Python?

If you want to work with Python, you need two things: a code editor, which ideally offers syntax high­light­ing, as well as the ap­pro­pri­ate version of Python for the re­spect­ive system and purpose. Your device doesn’t have to fulfil any special hardware or software re­quire­ments to install Python.

When deciding on a version, two questions in par­tic­u­lar need to be answered:

  1. Which operating system do you want to use Python on?
  2. What’s the purpose of your pro­gram­ming efforts?

In principle, you have great freedom in the choice of platform. The open-source language is available for Windows, Linux and macOS. Depending on the system, however, a different in­stall­a­tion package must be chosen.

The back­ground for the use or in­stall­a­tion of Python therefore plays a role because different versions are re­com­men­ded 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 pro­gram­ming a specific ap­plic­a­tion and want to ensure com­pat­ib­il­ity 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.

Where can you download Python?

There are various options for down­load­ing and setting up Python for different platforms. However, the best place to download all the different versions is, without doubt, the official Python website. Here you can find current and older versions, Docker images and de­vel­op­ment versions in the test phase for Windows, Linux/UNIX and macOS, or other platforms such as iOS, IBM i, AIX or Solaris.

Al­tern­at­ively, you can download Python, which is one of the most popular internet pro­gram­ming languages, in other ways. Users of Linux or macOS, for example, can also obtain the in­stall­a­tion 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 plans from IONOS, you’ve already got the right hosting en­vir­on­ment with domain and SSL / TLS cer­ti­fic­ate.

In­stalling and setting up Python on Windows: How it works

In­stalling 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 ap­pro­pri­ate in­stall­a­tion package

On the official Python website, you’ll find all relevant releases of Python 2 and Python 3 for Windows. For practice or work purposes, down­load­ing a ‘stable’ version is re­com­men­ded.

With all download packages, you have the choice between 32- and 64-bit. Choose the variant that suits your system ar­chi­tec­ture. Use the ‘Windows installer’ for an ordinary in­stall­a­tion (re­com­men­ded for beginners).

Note

The al­tern­at­ive ‘Windows em­bed­dable package’ allows you to unpack the Python program files without in­stall­a­tion. The available ‘pre-releases’ are language versions that are still in the testing phase.

By clicking on the re­spect­ive link, you’ll start the download.

Step 2: Install Python

Start the Python in­stall­a­tion by double-clicking the down­loaded file. In the opened in­stall­a­tion 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 pro­gram­ming language directly from the command prompt. Then click ‘Install now’.

The in­stall­a­tion starts im­me­di­ately and only takes a few seconds. You’ll see a cor­res­pond­ing success message, including another con­fig­ur­a­tion 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 in­stall­a­tion and setup of Python without enabling this option by clicking ‘Cancel’.

Step 3: Run Python

If you want to run Python now, you can use IDLE (In­teg­rated De­vel­op­ment and Learning En­vir­on­ment), the in­teg­rated de­vel­op­ment en­vir­on­ment of Python. This is auto­mat­ic­ally 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 pro­gram­ming with Python.

Tip

Are you still looking for the right web address? Find the right domain for your web project with the help of IONOS and benefit from ad­vant­ages like an SSL / TLS cer­ti­fic­ate and a mailbox.

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

With Linux dis­tri­bu­tions, you install Python con­veni­ently via the terminal — if the scripting language is not already installed on the system. For example, Ubuntu 20.04 and later versions of the de­riv­at­ive 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 in­stall­a­tion

Open the terminal and enter this command:

python3 --version

In the following line, Ubuntu auto­mat­ic­ally presents the current Python 3 version if the pro­gram­ming language is already installed.

Step 2: Install Python

If no version of Python is installed yet, you can always initiate the in­stall­a­tion using the package man­age­ment system apt. First, update the package manager with the following command:

sudo apt update

Then, install Python using this command:

sudo apt install python3
Note

To install selected versions of the scripting language on Linux, you need to obtain and unpack the ap­pro­pri­ate in­stall­a­tion package from the official homepage.

Step 3: Run Python

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

python3

How to install Python on macOS devices

Apple operating systems have come with Python pre­in­stalled for a long time, however, never with a version newer than Python 2.7. In­stalling a newer Python variant is therefore strongly re­com­men­ded, 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 (ac­cess­ible via the search function, for example) and call up the Homebrew official website. Copy the command shown and paste it into the terminal. Run the command and enter your password and the Homebrew in­stall­a­tion will begin.

After suc­cess­ful in­stall­a­tion, 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 en­vir­on­ment 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:

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:

python3
Tip

Do you want to delve deeper into pro­gram­ming with Python? In other articles in the Digital Guide, you can learn everything about the most important Python operators, the sim­il­ar­it­ies and dif­fer­ences between Python and PHP or how to fix typical Python errors and more.

Go to Main Menu