Setting up Python and Easy_Install on Windows 7

This weekend, I needed to set up Python on a Windows 7 virtual machine that I had set up on my Mac. I don’t know why, but I always seem to have a problem installing Python and setting up the environment and so I’m going to document the process here so that in X months time when I need to do it again, I just need to follow my own instructions!

As part of the process, I also install easy_install to install libraries and so I’ll also document that here.

1. Download the Python Windows installer from here -> (I downloaded Python 2.7.5) and run the executable on your machine.

2. Run the installer – I normally leave all the defaults as they are, so end up installing it in C:Python27

3. Once installed, SET UP YOUR ENVIRONMENT VARIABLES, I can not express how important this is as you’ll hit so many problems without do it (try opening the command prompt and typing python to see Windows shrug its shoulders and say “huh…dunno…”)

  • If you haven’t played with environment variables before, just stick to following these instructions as you can set them up through the Windows GUI.
  • Right click on “My Computer”, select “Properties” > “Advanced system settings” and click on the “Environment Variables” button
  • In the System Variables box, find the variable called “path” and click on the “Edit…” button
  • In the “Variable value” box, at the end of the entry, add the following text: ;C:Python27;C:Python27Scripts (note the leading semi colon, also note that I’m using the default installation folder – if you have installed Python elsewhere, just change the path structure).
  • Click “OK” a couple of times and hey presto, your environment variables are set up.
  • To test it has worked, open a new command window and type in python and if you see this, you’re on to a winner…

Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32
Type “help”, “copyright”, “credits” or “license” for more information.

4. The next step in the process is to set up easy_install and so we need to go to the setuptools page (links to version 0.8) and download the script (I normally put it straight in to my Python27 folder).

5. Open a command prompt and type python install – you’ll see a load of code whizz by which will hopefully end as follows;

Processing dependencies for setuptools==0.8
Finished processing dependencies for setuptools==0.8


6. easy_install has now been set up and you can test to see if it is there, by typing easy_install in to a command prompt, which will throw an error about no URLs, you know that the tool has been set up successfully


To use easy_install to get new libraries, just use the following syntax: easy_install <library name> (e.g. easy_install postcodes)

28 thoughts on “Setting up Python and Easy_Install on Windows 7

  1. Pingback: How to install pip on windows? – from stackoverflow | Different Insight

  2. mauricio


    I got stucked in step number 5.
    When I open the command prompt and type “python install” then an error message is displayed “syntax error”
    I do not know why is this happening and how to solve it. Any help?

    I also tried to run the script and I get the following:
    Extracting in c:usersaliceappdatalocaltemptmpqhiqcp
    Now working in c:usersaliceappdatalocaltemptmpqhiqcpsetuptools-0.8
    Installing Setuptools
    Something went wrong during the installation.
    See the error message above.

    Something is not working properly. Do you have any idea what could it be?
    Any help on the subject will be very much appreciated
    Thank you !!

    1. Adele Gilpin

      Hi Mauricio,

      It looks like it extracted it successfully in to c:usersaliceappdatalocaltemptmpqhiqcpsetuptools-0.8 and so I would use the command prompt to go in to that location and try running “python install” again from within there – that should work.

      Another thing to check is what version of Windows you are using (32 or 64 bit) and make sure you’ve downloaded and installed the correct version of setuptools.

      I hope that helps and good luck!


  3. William Shaffer

    Many thanx for providing excellent documentation. Identifying each stop clearly is very helpful. You don’t assume the reader knows where to ez_setup file or other small details that an derail the novice reader.

  4. Pingback: Windows에서 gensim 사용하기 | JCreator's Blog

  5. Sri

    This is the easiest most clear and helpful instructions to install python and other packages that I have come across on the web. Thanks a lot.

  6. pitchblack

    I can’t run easy install, when I run it I get the following error:

    ‘easy_install’ is not recognized as an internal or external command,
    operable program or batch file.

  7. Mehdi

    Hi, Thanks you very much. Really helpful.

    It’s been a while since this post was published, but I guess people will still come to this page.

    For future reference, I want to add this:

    I got stuck in step 5, too, just as reported by Mauricio in the comments.

    So, I did this trick: Go to your c:python27 directory. A zip file named must be there. Just open it and directly run the file. It worked for me and installed.

    Another issue: Even though I added the c:python27scripts in the PATH, it still did not run. So just try changing directory and running the name of the script. *for me, it was easy_install-script. py

    1. Adele Gilpin

      Hi Medhi,

      Many thanks for your comment – think it’s time I updated this post! It regularly gets a lot of traffic and is for an earlier version of Python so probably doesn’t match current installation requirements. Thanks for flagging it up and I’ll start working on an update!


  8. Pingback: Setting up Python and Easy_Install on Windows 7 | Code Awesome

  9. debraansell

    Thank you so much for this post. I was going around in circles trying to figure out how to install Python modules under Windows until I read this. Once I fixed my Path, everything ran great. You saved me a lot of time!

  10. Pingback: How to Mine Data from the Social Web Part 1 | Startup enthusiast

Leave a Reply

Your email address will not be published. Required fields are marked *