v 4.0b ImportError: No module named BeautifulSoup
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Beautiful Soup |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Upon installing BeautifulSoup 4.0b via `pip install BeautifulSoup` an import error is encountered:
bshumate@urkel ~: virtualenv test
New python executable in test/bin/python
Installing setuptools.
Installing pip....
bshumate@urkel ~: cd test
bshumate@urkel ~/test: source bin/activate
(test)bshumate@
Downloading/
Downloading BeautifulSoup-
Running setup.py egg_info for package BeautifulSoup
Installing collected packages: BeautifulSoup
Running setup.py install for BeautifulSoup
Successfully installed BeautifulSoup
Cleaning up...
(test)bshumate@
Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import BeautifulSoup
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named BeautifulSoup
>>>
Same results on two different systems / two different OS and appears to happen whether using a virtualenv or installing system-wide.
As described in the Beautiful Soup 4 README and the online documentation (http:// www.crummy. com/software/ BeautifulSoup/ documentation. html#Quick% 20Start), the package name for Beautiful Soup 4 is"bs4", not "BeautifulSoup". Beautiful Soup 4 is not backwards compatible with Beautiful Soup 3, and this change allows BS4 and BS3 to coexist on the same system.
I have changed the Beautiful Soup website to remove direct links to the BS4 tarball, in an attempt to prevent tools like pip from installing an unreleased version.