Download and Install Python 2.7 on Windows

2 minute read

download install python 2-7 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.

python-download-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.

python 2-7-15 specific release section

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.

python 2-7-15 windows 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.

python 2-7-15 downloaded installer

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.

windows 10 install app not in store

The Python installer setup screen will open.

Leave the Install for all users radio button selected.

Click Next.

python 2-7-15 installer start

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].

python 2-7-15 installer select destination

We keep the default Python features.

Click Next.

python 2-7-15 installer customize

The Python installation will now start.

A progress bar shows the various steps that are executed.

python 2-7-15 installation progress

Once the installation is complete, click Finish.

python-2-7-15-installer-complete

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.

windows search env

Wait for the environment variables window to open.

Click on New….

windows account environment variables 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.

python 2-7-15 home variable

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….

python 2-7-15 edit path variable

Click on New and type “%PYTHONPATH%\bin” as shown below.

Click OK.

python path variable

Click OK once more to close the environment variables window.

python 2-7-15 windows account environment variables

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.

windows search cmd

Wait for the command prompt to open.

Type “python -V” and press ENTER.

python version command

The above command prints the installed Python version: 2.7.15.

python 2-7-15 version output

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