Search code examples
pythonsetuptools

Can't install setuptools (python)


I have Windows 7 (64-bit) operating system. I have installed python. I want to install setuptools (for python). In their website (https://pypi.python.org/pypi/setuptools) it is written: "Download ez_setup.py and run it;" I download that file, save it to my hard drive. Then when I click (right mouse button) and select "Open with"-> "python", a black console screen appears for a second, then disappears. And that's all. What is wrong and how can I install that software?


Solution

    1. Open a command prompt (Start menu -> cmd.exe)
    2. Navigate to the directory where ez_setup.py is saved, e.g.:

      cd C:\Users\You\Downloads
      
    3. Run it (C:\Python27\ should already be on your %PATH%; if it's not, add it -- see below):

      python ez_setup.py
      
    4. Read the output. If it worked, you should be able to install packages like so:

      C:\Python27\Scripts\easy_install jinja2
      
    5. Add the path to easy_install to your %PATH% so that you can use it easily from any directory:

      1. Control Panel -> System -> Advanced system settings
      2. Click the Environment variables... button
      3. Edit PATH and append ;C:\Python27\Scripts\ to the end (substitute your Python version)
      4. Click OK. Note that changes to the PATH are only reflected in command prompts opened after the change took place.

    If something goes wrong, the command prompt will remain open after the program finishes, so you'll be able to read the error and use it to resolve the problem.