Installing Python:: Step 1: Installing The Package
To install Python and a package (simplejson) on Windows:
1. Download and install Python 2.7, setting the path to C:\Python27.
2. Download simplejson from PyPI and extract the file.
3. Open the command prompt and navigate to the simplejson directory.
4. Run "python setup.py install" to install simplejson into the Python library.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
116 views3 pages
Installing Python:: Step 1: Installing The Package
To install Python and a package (simplejson) on Windows:
1. Download and install Python 2.7, setting the path to C:\Python27.
2. Download simplejson from PyPI and extract the file.
3. Open the command prompt and navigate to the simplejson directory.
4. Run "python setup.py install" to install simplejson into the Python library.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3
Installing python:
Step 1: Installing the Package
At the time of this draft, Python 2.7 is the stable install. Download Python from http://www.python.org/ and install it at C:\Python27\ For users with 64-bit systems, the 32-bit version of all software is recommended.
Open the Command Prompt Goto your Start Menu. Start > All Programs > Accessories > Command Prompt
Type into the Command Prompt window: set path=%path%;C:\Python27\ And hit enter. You only need to do this once and never again. Read about it here:http://docs.python.org/tutorial/interpreter.html
Now we're ready to install a package. There's lots to chose from but we'll start here...
Download simplejson at http://pypi.python.org/pypi/simplejson This is a simplejson-2.1.6.tar.gz file, which in Windows language means it is a strange and otherworldly kind of zip file.
To open the *tar.gz file, download PeaZip for Windows http://peazip.org/ Use PeaZip to extract (uncompress / unzip) simplejson-2.1.6.tar.gz into your Download directory. You should end up with something similar to this: C:\Users\pdxNat\Downloads\simplejson-2.1.6\
Go back to your Command Prompt window or open a new one. 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 )
When you start, your command line should look something like this: c:\Users\pdxNat> You want to get into the simplejson-2.1.6 directory, 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 Your prompt will change from this c:\Users\pdxNat> to this c:\Users\pdxNat\Downloads\simplejson-2.1.6>
Now for the fun part. 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 : python setup.py install See all that stuff flying by? 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\ You'll see simplejson-2.1.6-py2.7.egg has been added to the directory.
Now open IDLE (Start > All Programs > Python 2.7 > IDLE (Python GUI)) and type the following: >>> import simplejson See all that nothing that happens? That's your sign of success. Congratulations. You've just installed and imported your first package for Python on Windows 7. Repeat as needed.
Python Programming Reference Guide: A Comprehensive Guide for Beginners to Master the Basics of Python Programming Language with Practical Coding & Learning Tips
Python Programming: 8 Simple Steps to Learn Python Programming Language in 24 hours! Practical Python Programming for Beginners, Python Commands and Python Language