Monday, February 18, 2013

How to Install Python, Distribute (SetupTools), and Pip (Easy_Install) on a Windows 64bit Computer


This tutorial will help you install Python and get you set up with the basic scripts that are essential if you will be installing other Python modules. I wrote this because I had an incredibly difficult time trying to find simple instructions on the web to install Python and additonal modules that work with a Windows 64bit computer. It seems that the preferred modules, such as setuptools, fail to work with the 64Bit version of Python. In light of that, I hope this tutorial finds you and makes your life a little bit easier.

  1. Download a version of Python - http://www.python.org/download/.
  2. Download PeaZip so that you can extract .tar files.
  3. Since setuptools for Windows 64Bit is busted. Download the most recent version of Distribute.
  4. Since easy_install for Windows 64Bit is busted. Download the most recent version of Pip.
  5. Install Python, make the program folder easy to find because you will need to key the folder path into your Command Prompt in a later step.
  6. Using PeaZip, find the Distribute tar file. Double click the tar file so that it displays a folder with the same name. Click "Extract." Where the screen says "Output" select the path of the folder where you've stored folder for Python (Note: Do not save it in the Python Folder. Additionally, PeaZip may not have write access to your hard drive /program files directory - in this case, make a new folder and extract Distribute there).
  7. Using PeaZip, find the Pip tar file. Double click the tar file so that it displays a folder with the same name. Click "Extract." Where the screen says "Output" select the path of the folder where you've stored folder for Python (Note: Do not save it in the Python Folder. Additionally, PeaZip may not have write access to your hard drive/program files directory - in this case, make a new folder and extract Pip there).
  8. Click the Windows Icon (Start Menu). In the search box, type in "cmd.exe" and click on the cmd application.
  9. Copy and paste this into the command line: "set path=%path%;C:\PythonXX\" - where XX is version number of Python that you are running. Example, mine is \Python33\. You will need to right click and select Paste as the shortcut Ctrl + V will not work. (Note: if you changed the path of your Python folder, you will need to enter that path instead of C:\ - additionally, if you changed the name of your Python folder, you'll need to change that as well.)
  10. Now, you are going to need to change the path of your command prompt to the Distribute folder.
    1. Find the location of your Distribute folder, be sure to open all the way up to where the file setup.py is located.
    2. Right click on that folder.
    3. Click "Properties."
    4. Find where it says "location."
    5. Copy that location in its entirety (starting from "C:\" or whatever letter your hard drive is).
    6. Paste that into the cmd prompt. 
    7. At the beginning of the line you just pasted, type in "cd " (including the space), so now you should have "cd PATHNAME" on the command line. Press enter.
    8. Type in "cd " and the name of your Distribute folder and press Enter. Example: "cd C:\distribute-0.6.35"
  11. In the command prompt, type in "python setup.py install."
  12. Text should fly through the command prompt and at the end of it all the program should install.
  13. type in "cd.."
  14. Now, you are going to need to change the path of your command prompt to the Pip folder.
    1. Find the location of your Pip folder, be sure to open all the way up to where the file setup.py is located.
    2. Right click on that folder.
    3. Click "Properties."
    4. Find where it says "location."
    5. Copy that location in its entirety (starting from "C:\" or whatever letter your hard drive is).
    6. Paste that into the cmd prompt. 
    7. At the beginning of the line you just pasted, type in "cd " (including the space), so now you should have "cd PATHNAME" on the command line. Press enter.
    8. Type in "cd " and the name of your Pip folder and press Enter. Example: "cd C:\pip-1.2.1"
  15. In the command prompt, type in "python setup.py install.
  16. Text should fly through the command prompt and at the end of it all the program should install.
  17. Now you have the easy downloaders installed so you can easily download other Python modules easily.
To install other Python modules using easy installation, see this post: "How to easily install Python modules by using Pip."

1 comment: