Python Installation

As we learned in the previous Python Introduction article, python is a free, open-source, and cross-platform language. So, the python can run on multiple OS platforms like Windows, Linux, Mac, etc.


We will now learn how to install python or set up a Python development environment on different OS platforms like Windows, Mac, and Linux machines.

Download and Install Python

Before you start python installation, first verify whether the python has already installed on your machine or not. Nowadays, most of the devices are coming with preinstalled python.


To verify python installation, open the command prompt (cmd.exe) or Terminal and type the command like python --version. If you found that python has not installed on your machine, follow the below steps based on your OS version.

Python Installation on Windows

To install Python on a Windows machine, visit download python Url to download and install the latest python version. When you open the URL, it will automatically detect your OS and display the download link as per your operating system like as shown below.


Download latest python version


When you click on the Download Python 3.8.3 button, it will download the python-3.8.3.exe file for a 32-bit version. If you want to download the 64-bit version, visit the python for windows page and download the appropriate 64-bit installer like as shown below.


Download 64-bit python installer for windows


As you have downloaded the python installer for windows, install python on your machine by double-clicking on the setup file to start the installation process like as shown below.


Click on Install Now option to install latest python version


If you choose the Install Now option, it will install Python in the default installation folder (C:\Users\{UserName}\AppData\Local\Programs\Python\Python38) with default settings. If you want to customize the python installation folder location & features, you can choose the Customize installation option. Select Add Python 3.8 to path option so that you can execute the python from any path.


Choose options to install latest python for windows


If you choose the Customize installation option in the next step, it will show the Optional Features to select like as shown below.


Python custom installation with optional features


After selecting the required features, click the Next button to continue. In the next step in Advanced Options, choose to Install for all users option so that all the machine users can execute the python programs. Also, change the python installation folder location and click the Install button by keeping all the default options as shown below.


Python custom installation with advanced options


After you click on the Installation button, the python setup process will start, and you can see the progress of the python installation like as shown below.


python installation setup progress indicator


After completing the python installation, you will see the success message window like as shown below, and click on the Close button to close the setup wizard.


Python installation completion window

Verify Python Installation

After completing python installation on your machine, you can verify it by opening the command prompt and typing python --version command. 


If python is installed successfully, it will display the version of python installed on your machine as shown below.


Verifying python installation on windows machine

Python Installation on Mac

To install Python on Mac machines, visit Python for Mac OS page, download and install the latest Python 3.x version based on your requirements.

Python Installation on Linux

Nowadays, Linux machines are coming with preinstalled python. To verify whether the python installed or not, open the command line and execute the following command.


python --version

If you find that python is not installed, run the following commands to install python.


$ sudo apt-get update

$ sudo apt-get install python3.8

Same way, you can install python on other operating systems by downloading the required components from Download python URL.


In the next chapters, we will learn how to use python to build applications with examples.