Boston Python Workshop 3/Friday/Linux project dependencies: Difference between revisions

m
Protected "Boston Python Workshop 3/Friday/Linux project dependencies" ([edit=autoconfirmed] (indefinite) [move=autoconfirmed] (indefinite))
imported>Jesstess
imported>Jesstess
m (Protected "Boston Python Workshop 3/Friday/Linux project dependencies" ([edit=autoconfirmed] (indefinite) [move=autoconfirmed] (indefinite)))
 
(11 intermediate revisions by 3 users not shown)
Line 60:
 
# Create a new folder called Wordplay on your Desktop
# Save http://mit.edu/jesstess/www/BostonPythonWorkshop2/Wordplay/words.pythe following files to the Wordplay folder.:
# Save# http://mit.edu/jesstess/www/BostonPythonWorkshop2BostonPythonWorkshop3/Wordplay/wordssowpods.txt to the Wordplay folder.
## http://mit.edu/jesstess/www/BostonPythonWorkshop3/Wordplay/scrabble.py
## http://mit.edu/jesstess/www/BostonPythonWorkshop3/Wordplay/scrabble_cheater.py
## http://mit.edu/jesstess/www/BostonPythonWorkshop3/Wordplay/words1.py
## http://mit.edu/jesstess/www/BostonPythonWorkshop3/Wordplay/words2.py
## http://mit.edu/jesstess/www/BostonPythonWorkshop3/Wordplay/words3.py
## http://mit.edu/jesstess/www/BostonPythonWorkshop3/Wordplay/words4.py
## http://mit.edu/jesstess/www/BostonPythonWorkshop3/Wordplay/words5.py
## http://mit.edu/jesstess/www/BostonPythonWorkshop3/Wordplay/words6.py
 
===Test the Wordplay code===
Line 77 ⟶ 85:
</pre>
 
will show you the source code files in that directory. One of the files is "wordswords1.py", which has a ".py" extension indicating that it is a Python script. Type:
 
<pre>
python wordswords1.py
</pre>
 
at the command prompt to execute the wordswords1.py Python script. You should see a column of English words printed to the screen. If you don't, let a staff member know.
 
===Success!===
Line 95 ⟶ 103:
<ol>
<li>Click and save these four dependencies to your Desktop:
* http://mit.edu/jesstess/www/BostonPythonWorkshop2BostonPythonWorkshop3/Twitter/python-twitterhttplib2-0.86.20.zip
 
* http://mit.edu/jesstess/www/BostonPythonWorkshop2BostonPythonWorkshop3/Twitter/httplib2simplejson-02.61.06.zip
* http://mit.edu/jesstess/www/BostonPythonWorkshop2BostonPythonWorkshop3/Twitter/python-oauth2twitter-0.8.2.zip
* http://mit.edu/jesstess/www/BostonPythonWorkshop2BostonPythonWorkshop3/Twitter/simplejsonpython-2.1.6oauth2.zip
* http://mit.edu/jesstess/www/BostonPythonWorkshop2/Twitter/python-twitter-0.8.2.zip
</li>
<li>
Line 108 ⟶ 115:
===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. '''It is important that the dependencies are installed in the order listed above.''' For each project, start a command prompt and navigate to the Desktop directory where the source code lives. For example, if the httplib2-0.6.0 project was extracted to /home/jesstess/Desktop/Twitter/httplib2-0.6.0,
 
<pre>
Line 123 ⟶ 130:
 
<pre>
sudo python setup.py install
</pre>
 
type in your password, and hit enter to install httplib2.
 
Navigate to the 3 other dependency directories and run
 
<pre>
sudo python setup.py install
</pre>
 
in all of them to install those dependencies as well.
 
If you get an error like:
 
<pre>
ImportError: No module named setuptools
</pre>
 
you need an extra package. Type:
 
<pre>
sudo apt-get install python-setuptools
</pre>
 
We've written some skeleton code for the Twitter project already. Download this code so you're ready to start working with it tomorrow:
Anonymous user