Installing Python Interpreter in Windows 10

Python is a popular high-level programming language used for general purpose programming. But unlike Linux/Unix based operating systems, python interpreter does not come pre-packaged with windows 10. It means we have to install it by ourselves.

Installing python in Windows 10 in very easy, we just need to download the installer file and install it. You can download python interpreter for windows from below link :

             https://www.python.org/downloads/windows/

There are two versions of python is available for windows :
  • Python 3.7.x
  • Python 2.7.x
You can use any one of them, But if you want use security related python tools in your windows machine, then i will recommend you to use Python 2.7.x.

Installation Process of Python 3.7.x :

Now lets first look at the installation process of Python 3.7.x. It takes place with the following steps :

1. Download the Python installer from the website.


On next page scroll down to the download link and download the 64 or 32 bit installer.


2. Now run the installer file and follow the instructions.


Checkout the below box and click on "Install Now" option, and wait for the installation process to complete, and at the end click on the 'close' button. Now to start python interpreter open the command prompt and type python.



 Installation Process of Python 2.7.x :

The installation steps are as follows :

1. Download the Python installer from the website.


On next page scroll down to the download link and download the 64 or 32 bit installer.


2. Now run the installer file and follow the instructions.





And wait for the installation process to complete, and at the end click on the 'Finish' button. 

3. Now we need to add the path of python interpreter into global environment variables. To do this first copy the path for python which is "C:\Python27"


Now right click "My Computer" or "This PC" and then click on "Properties"


Then click on "Advanced system Settings"


Then click on "Environment Variables.." on the new window


Now in the Environment Variables window, on the second box named 'system variables' select 'Path' and click on the edit button.


In "Edit environment variable" window click on "New" button to add new environment variable.


At here put the path of python interpreter file, which is "C:\python27", then click OK button.


After that click OK on all the opened windows. Now open command prompt at type python in it.


Now we can run any python script from the command prompt from anywhere in the system, just make sure to use python before the script name. For example :
$ python myscript.py