How to Install Python Packages on Windows
Open the Command Prompt. , Go to your Start Menu., Type into the Command Prompt window: set path=%path%;C:\Python27\ , And hit enter., Download simplejson at http://pypi.python.org/pypi/simplejson. , This is a simplejson-2.1.6.tar.gz file, which in...
Step-by-Step Guide
-
Step 1: Open the Command Prompt.
Start > All Programs > Accessories > Command Prompt. ,, You only need to do this once and never again.
Read about it here: http://docs.python.org/tutorial/interpreter.html ,,,,,,,,,,,,,, Inside that simplejson directory there is a file called setup.py.
We're going to install that into the Python universe.
Type this into the Command Prompt : , For other windows users type: python setup.py install , Forget about it.
Open a Windows Explorer window (Start > All Programs > Accessories > Windows Explorer ) and go have a look inside the directory at C:\Python27\Lib\site-packages\ ,,,, That's your sign of success.
Congratulations. ,,,,,,,,,,,, For example, C:\Python33\ if you want to use the command line.,,,,,,,,, C:\Python33\) preceded by a semicolon (;) which is used to separate the values, so you would add
-Â ;C:\Python33\.,,, -
Step 2: Go to your Start Menu.
-
Step 3: Type into the Command Prompt window: set path=%path%;C:\Python27\
-
Step 4: And hit enter.
-
Step 5: Download simplejson at http://pypi.python.org/pypi/simplejson.
-
Step 6: This is a simplejson-2.1.6.tar.gz file
-
Step 7: which in Windows language means it is a strange and otherworldly kind of zip file.
-
Step 8: To open the *tar.gz file
-
Step 9: download PeaZip for Windows http://peazip.org/
-
Step 10: Use PeaZip to extract (uncompress / unzip) simplejson-2.1.6.tar.gz into your Download directory.
-
Step 11: You should end up with something similar to this: C:\Users\pdxNat\Downloads\simplejson-2.1.6\
-
Step 12: Go back to your Command Prompt window or open a new one.
-
Step 13: You'll need to change directories in the command line and here's how you do that (http://coweb.cc.gatech.edu/ice-gt/339 )
-
Step 14: When you start
-
Step 15: your command line should look something like this: c:\Users\pdxNat>
-
Step 16: You want to get into the simplejson-2.1.6 directory
-
Step 17: so at the command prompt type this: cd downloads\simplejson-2.1.6 or the complete path: cd c:\Users\pdxNat\Downloads\simplejson-2.1.6
-
Step 18: Your prompt will change from this
-
Step 19: c:\Users\pdxNat>
-
Step 20: to this
-
Step 21: c:\Users\pdxNat\Downloads\simplejson-2.1.6>
-
Step 22: Now for the fun part.
-
Step 23: For Windows 7 64 bit users
-
Step 24: type: setup.py install.
-
Step 25: See all that stuff flying by?
-
Step 26: You'll see simplejson-2.1.6-py2.7.egg has been added to the directory.
-
Step 27: Now open IDLE (Start > All Programs > Python 2.7 > IDLE (Python GUI)) and type the following:
-
Step 28: >>> import simplejson
-
Step 29: See all that nothing that happens?
-
Step 30: You've just installed and imported your first package for Python on Windows 7.
-
Step 31: Repeat as needed.
-
Step 32: For more information
-
Step 33: see http://docs.python.org/tutorial/index.html and http://www.python-forum.org.
-
Step 34: Download a package.
-
Step 35: Extract the package
-
Step 36: Open Command Prompt
-
Step 37: Set path (1st time only)
-
Step 38: Change directory to Download\package\
-
Step 39: Type >python setup.py install.
-
Step 40: Download the Windows MSI installer (either x86 or x64).
-
Step 41: Run the program.
-
Step 42: Take note of the path during the installation.
-
Step 43: If you do not care to use the command line
-
Step 44: you can now use the IDLE integrated development environment for Python and consider yourself done.
-
Step 45: If you want to use the command line
-
Step 46: click on Control Panel.
-
Step 47: Click on System and Security.
-
Step 48: Click on System.
-
Step 49: Click on the Advanced system settings link.
-
Step 50: Click on the Environmental Variables button.
-
Step 51: Under System Variables
-
Step 52: look for the Variable named Path.
-
Step 53: Select Path and click on the Edit button.
-
Step 54: At the end of the Variable value
-
Step 55: add the value you took note of in step 3 (i.e.
-
Step 56: Open your command line and type 'python' - if successful
-
Step 57: you should see three greater than symbols at the command prompt (>>>).
-
Step 58: To exit the Python interpreter
-
Step 59: type 'exit()'.
-
Step 60: That's it!
Detailed Guide
Start > All Programs > Accessories > Command Prompt. ,, You only need to do this once and never again.
Read about it here: http://docs.python.org/tutorial/interpreter.html ,,,,,,,,,,,,,, Inside that simplejson directory there is a file called setup.py.
We're going to install that into the Python universe.
Type this into the Command Prompt : , For other windows users type: python setup.py install , Forget about it.
Open a Windows Explorer window (Start > All Programs > Accessories > Windows Explorer ) and go have a look inside the directory at C:\Python27\Lib\site-packages\ ,,,, That's your sign of success.
Congratulations. ,,,,,,,,,,,, For example, C:\Python33\ if you want to use the command line.,,,,,,,,, C:\Python33\) preceded by a semicolon (;) which is used to separate the values, so you would add
-Â ;C:\Python33\.,,,
About the Author
Sandra Smith
Committed to making DIY projects accessible and understandable for everyone.
Rate This Guide
How helpful was this guide? Click to rate: