Download and Install Python 2.7 on Windows
This is a complete guide to download and install Python 2.7 on Windows.
So if you want to know how to set up Python, you’ll love the step-by-step approach in this tutorial.
We’ve got a couple of items to cover.
Let’s get started.
Check following post if you are looking to download and install Python 3.4.
Step #1: Download
Head over to the Python downloads page.
Scroll down to the Looking for a specific release?
section.
Look for the latest Python 2.7.X
entry in the list. At the time of writing, this was Python 2.7.15
.
Click on Download
.
Scroll down until the Files
section.
Check your windows bit version and click on the corresponding link:
- For 32-bit = Windows x86 MSI installer
- For 64-bit = Windows x86-64 MSI installer
In this guide, we will install the 64-bit version. So we click on Windows x86-64 MSI installer
.
Wait for the download to complete.
Do you want to skip the above steps? Here is the direct link to download the 32 bit or 64 bit Python 2.7.15 installer for Windows.
Step #2: Install
Open the location of the downloaded installer.
Double-click the installer to start the installation.
On Windows 10 a pop-up window will appear: The app you're trying to install isn't a verified app from the Store
Click on Install anyway
.
The Python installer setup screen will open.
Leave the Install for all users
radio button selected.
Click Next
.
You can change the installation location by clicking on the Change…
button.
In this example, we keep the default install location of C:\Python27
. From now on we will refer to this directory as [PYTHON_INSTALL_DIR]
.
We keep the default Python features.
Click Next
.
The Python installation will now start.
A progress bar shows the various steps that are executed.
Once the installation is complete, click Finish
.
Step #3: Setup
We need to set up an environment variable that will point to our Python installation.
Click on the search button. Then type “env”.
If you have Windows 7 click on the Windows button.
Click on the Edit environment variables for your account
shortcut.
Wait for the environment variables window to open.
Click on New…
.
Enter “PYTHONPATH” as variable name. Enter the [PYTHON_INSTALL_DIR]
as variable value.
In this tutorial, the installation directory is C:\Python27
.
Click OK
.
Next, we need to configure the PATH environment variable so we can run Python from a command prompt.
Select the PATH
variable. Click on Edit…
.
Click on New
and type “%PYTHONPATH%\bin” as shown below.
Click OK
.
Click OK
once more to close the environment variables window.
On Windows 7 you cannot add extra values for an existing
Path
variable. You need to append “;%PYTHONPATH%” at the end of the variable value instead.
Step #4: Test
To test the setup click on the search button. Then type “cmd”.
Click on the Command Prompt
shortcut.
Wait for the command prompt to open.
Type “python -V” and press ENTER
.
The above command prints the installed Python version: 2.7.15.
Congratulations, you have installed Python 2.7.15 on Windows 10!
Good luck and leave a comment if you liked this post.
Thanks!
Leave a comment