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:\Python27\Scripts (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)



  1. Very Helpful…

  2. […] Setting up Python and Easy_Install on Windows 7 ( […]

  3. Hello,

    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:\users\alice\appdata\local\temp\tmpqhiqcp
    Now working in c:\users\alice\appdata\local\temp\tmpqhiqcp\setuptools-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. Hi Mauricio,

      It looks like it extracted it successfully in to c:\users\alice\appdata\local\temp\tmpqhiqcp\setuptools-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!


  4. Really helpful. Thank you so much!

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

  6. Sitaram Khadka · · Reply

    You are great!!!!

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

  8. Thank you !

  9. pitchblack · · Reply

    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.

    1. Hi,

      Take a look at this post on StackOverflow – just make sure your environment variables have been set up and you should be good to go.


  10. I am just going through the install. In my case add pythone.exe to path option was not selected.

  11. 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:\python27\scripts 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. 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!


  12. […] via Setting up Python and Easy_Install on Windows 7. […]

  13. Bharat Patil · · Reply

    Thanks this was very helpful

  14. debraansell · · Reply

    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!

  15. […] you’re a Windows user (like me) you won’t have a good time, but using easy_install makes life way easier! This tutorial might also be helpful for windows users. If you’re on a […]

  16. Oh thanks. Finally a simple and straigh forward way

  17. Thank you so much, this was so helpful

  18. PhuongNH · · Reply

    Very helpful, thank you ;).

  19. Just what I needed!

  20. Nithya · · Reply

    Thank you so much ..!

  21. fezgfreg · · Reply

    So good tutorial!!!
    Thank you so much

  22. tvantimmeren · · Reply

    Oh yes, thanks!

  23. Thanks Brother! You saved my day….

  24. I realize it’s been a few years since you posted it, but thanks for putting this out there, Adele. Super helpful.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: