Install python modules?

software development

#1

I have a python script to run that calls BeautifulSoup for web parsing. Can anyone suggest how to install BeautifulSoup so I can access it?

TIA,
matt.


#2

somehow a friend of mine was able to get beautiful soup installed and it worked. But not correctly. When I run this command:

import urllib2
from BeautifulSoup import BeautifulSoup

page = urllib2.urlopen(“http://www.icc-ccs.org/prc/piracyreport.php”)

the first two lines work. But the urllib2.urlopen doesn’t work. I get this error from which has to do with something on line 124 of the urllib2.py

return _opener.open(url, data, timeout)

Any help from anyone that has this working correctly would be great :slight_smile:

to matthewcroberts:

I was able to install the soup from this page
http://cosl.usu.edu/projects/educommons/documentation/how-to/installation-instructions

I had to change the filepath to where i put the soup.
i.e.
/home/username/bin/python setup.py build

I put the soup file here and then unzipped it
/home/username/lib/python2.6/site-packages

I hope that helps and let me know if it works for you


#3

What do you mean have to "change the file path " and "put the soup file here "?