May 18, 2011

Install BeautifulSoup in Python

BeautifulSoup is a great error-tolerant HTML parser for Python. The install is rather straightforward:

1. Download the source code from the official website.
2. Unzip it in the working directory of Python "/usr/local/lib/python2.x/site-packages", in which the python2.x is the current using version. (actually... it is OK to install it in anywhere in convenience)
3. In the directory above, input: "~$ python setup.py install".
4. Completed. Check the current version of BeautifulSoup via:
~$ python
>>> import BeautifulSoup
>>> print BeautifulSoup.__version__
3.2.0 (Yeah~!)
5. Cheers.

No comments:

Post a Comment

Days of our lives

Daisypath Anniversary tickers