Installation and using Python on Windows 10 is straightforward and easy. The installation procedure can be followed in just three steps in our article.
- Download the setup files
- Run the Executable Windows installer
- Add Python to PATH environmental variables
To install Python, we need to download the official Python executable installer from the official site. Next, you need to run this installer and complete the installation steps. Finally, you can configure the PATH variable to use python from the command line.
Steps to Install Python on Windows 10:-
We can choose the version of Python we wish to install. It is recommended to install the latest version of Python, which is 3.8.2 when writing this article.
1.) Download the Python Installer binaries
- Open the official Python website in the web browser. Then Navigate to the Downloads tab for Windows.
- After that, the latest Python 3 release. In our example, we choose the latest Python 3.8.2 version.
- Click on the link to download the Windows x86 executable installer if you are using a 32-bit installer. In case your Windows installation is a 64-bit system, then download Windows x86-64 executable installer.
NOTE: Python 3 series will not work on WindowsXP running systems
2.) Run the Executable Installer
Once the installer has been downloaded, run the Python installer.
Check the Install launcher for all user’s checkbox. Further, we can also check the Add Python 3.8.2 to path checkbox to include the interpreter in the execution path and skip adding environmental variables.
Select Customize installation.
Choose the optional features just by checking the following checkboxes:
- tcl/tk and IDLE (to install Tkinter and IDLE)
- The python test suite (to install the standard library test suite of Python)
- Install the global launcher for `.py` files. This makes it easier to start Python
- Install for all users
This takes us to Advanced Options available while installing Python. Here, select the Install for all users and Add Python to environment variables checkboxes.
Optionally, we can select the Associate files with Python, Create shortcuts for installed applications, and other advanced options. Make a note of the python installation directory displayed in this step. You would need it for the next step.
After selecting the Advanced options, click Install to start the installation.
Once the installation is over, windows will show a Python Setup Successful window.
3.) Add Python to environmental variables
The last (optional) step in the installation process is to add Python Path to the System Environment variables. This step is done to access Python through the command line. In case we have tick marked the option of Add to Path, then this step is not to be followed; you can avoid this step. Else, this step is done manually as follows.
In the Start menu, search for “advanced system settings.” Select “View advanced system settings.”
In the “System Properties” window, click on the “Advanced” tab.
And then click on the “Environment Variables” button.
Locate the Python installation directory on your system. If you followed the steps exactly as above, python will be installed in the below locations:
- C:\Program Files (x86)\Python38-32: for 32-bit installation
- C:\Program Files\Python38-32: for 64-bit installation
The folder name may be different from “Python38-32” if the installation is done with a different version. Look for a folder whose name starts with Python.
Add the following entries to the PATH variable, as shown below:
4.) Verify the Python Installation
We have now successfully installed Python 3.7.3 on Windows 10. We can verify if the Python installation is successful or not through the command line or the IDLE app installed along with the installation.
Search for the command prompt, open it, and type “python” when the command prompt opens. Users can see that Python 3.8.2 is successfully installed.
An alternate way to reach to python is to search for “Python” in the start menu and clicking on IDLE (Python 3.8 32-bit).
From Editor’s Desk
We can start coding in Python using the Integrated Development and Learning Environment (IDE). Coding can be done at both places, either from CMD or IDLE. So, now we are ready for coding and making programs on python in our Windows 10 system. Enjoy!