just picked up v 4.0 beta from pypi, broken install?

40 views
Skip to first unread message

Harry P

unread,
Aug 19, 2011, 9:42:09 AM8/19/11
to beautifulsoup
to reproduce:

pip install BeautifulSoup

#Requirement already satisfied (use --upgrade to upgrade):
BeautifulSoup in /usr/local/lib/python2.7/site-packages/
BeautifulSoup-4.0b-py2.7.egg

python

>>>import BeautifulSoup
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named BeautifulSoup

Leonard Richardson

unread,
Aug 19, 2011, 10:02:34 AM8/19/11
to beauti...@googlegroups.com
I forgot to mention this on the list, but Beautiful Soup 4 is now in
beta, thanks to Thomas Kluyver's work on Python 3 compatibility. You
can get it from the BS homepage, or apparently you can install it from
pypi (I'm not sure how--I didn't set that up, and I don't intend it to
be the default version of BS yet.)

Anyway, check out the README, because a lot has changed, including the
package name. It's now bs4, not BeautifulSoup. This lets you have both
BS4 and BS3 on the same system, and it means that you type "from bs4
import BeautifulSoup" instead of "from BeautifulSoup import
BeautifulSoup", which if you type that as much as I do is a real
improvement.

So, Harry, to answer your question, the package name has changed, so
try bs4 instead of BeautifulSoup and it should work.

Leonard

Reply all
Reply to author
Forward
0 new messages