Installation of Python and Environment setup
In this section, we will learn how to install Python on various operating systems.
Installation of Python on Windows
To download the latest release of Python go to this link https://www.python.org/downloads/. In this process, we will install Python on our Windows OS.
Double-click the downloaded .exe file; The following window will open. customize installation and proceed.
The following window shows all the optional features. To continue we need to click on Next.
The following window shows the list of advanced options. Select all the options you want to install and click on Next. Notice here that the first check box is selected (install for all users). Now, we are ready to install Python.
Now, try running Python at command prompt. In the case of python2 or python3, type the command Python. This will show an error as per the image below. This is because we have not led the way.
To determine the path to Python, right click on “My computer” and go to Properties → Advanced → Environment Variables.
Add a new path variable to the user variable section.
Type PATH as the variable name and set the path for Python’s installation directory.
Now, the path is fixed, we are ready to run Python on our system. Open CMD again, and type Python again. This will open the Python interpreter where we can execute Python’s statements.