Boston Python workshop 2/Friday setup/Windows project dependencies

From OpenHatch wiki
Revision as of 13:54, 13 May 2011 by imported>Jesstess (Created page with '==ColorWall== ==WordPlay== ==Twitter== ===Download and extract the Twitter project dependencies=== <ol> <li>Click and save these four dependencies to your Downloads directory…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

ColorWall

WordPlay

Twitter

Download and extract the Twitter project dependencies

  1. Click and save these four dependencies to your Downloads directory:
  2. The ".zip" extension on the above files indicates that they are compressed Zip archives. We need to "extract" their contents. To do this, click on "Start", then "Computer", and navigate to your Downloads directory. For each of the 4 zip files, click on the file and click the "Extract all files" button to extract the contents. This will create a directory for each file, containing the source code for the dependency.

Install the Twitter project dependencies

Each of these 4 dependencies has an installer script that we'll need to run at a command prompt to install the software. For each project, start a command prompt and navigate to the Downloads directory where the source code lives. For example, if the httplib2-0.6.0 project was extracted to C:\Users\jesstess\Downloads\httplib2-0.6.0,

cd C:\Users\jesstess\Downloads\httplib2-0.6.0

will change you into that directory, and

dir

will show you the source code files in that directory. One of the files is "setup.py", which has a ".py" extension indicating that it is a Python script. Run:

python setup.py install

to install httplib2.

Navigate to the 3 other dependency directories and run

python setup.py install

in all of them to install those dependencies as well.

Check your installation

You'll now be able to import the Twitter module. We will use this module tomorrow to wrtite parts of a Twitter client.

Start a Python prompt, and at the Python prompt run

import twitter

If nothing gets printed, the installation was successful! If you get an error message, let a staff member know and we'll help work out what the issue is.