Javatpoint Logo
Javatpoint Logo

How to Install Python (Environment Set-up)

In this section of the tutorial, we will discuss the installation of python on various operating systems.

Installation on Windows

Visit the link https://www.python.org/downloads/ to download the latest release of Python. In this process, we will install Python 3.6.7 on our Windows operating system.

Python Environment Set-up

Double-click the executable file which is downloaded; the following window will open. Select Customize installation and proceed.

Python Environment Set-up

The following window shows all the optional features. All the features need to be installed and are checked by default; we need to click next to continue.

Python Environment Set-up

The following window shows a list of advanced options. Check all the options which you want to install and click next. Here, we must notice that the first check-box (install for all users) must be checked.

Python Environment Set-up

Now, we are ready to install python-3.6.7. Let's install it.

Python Environment Set-up

Now, try to run python on the command prompt. Type the command python in case of python2 or python3 in case of python3. It will show an error as given in the below image. It is because we haven't set the path.

Python Environment Set-up

To set the path of python, we need to the right click on "my computer" and go to Properties → Advanced → Environment Variables.

Python Environment Set-up
Python Environment Set-up

Add the new path variable in the user variable section.

Python Environment Set-up

Type PATH as the variable name and set the path to the installation directory of the python shown in the below image.

Python Environment Set-up

Now, the path is set, we are ready to run python on our local system. Restart CMD, and type python again. It will open the python interpreter shell where we can execute the python statements.


Installation on Mac

To install python3 on MacOS, visit the link https://www.javatpoint.com/how-to-install-python-on-mac and follow the instructions given in the tutorial.


Installation on CentOS

To install Python3 on CentOS, visit the link https://www.javatpoint.com/how-to-install-python-on-centos and follow the instructions given in the tutorial.


Installation on Ubuntu

To install Python3 on Ubuntu, visit the link https://www.javatpoint.com/how-to-install-python-in-ubuntu and follow the instructions given in the tutorial.





Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


B.Tech / MCA