v 4.0b ImportError: No module named BeautifulSoup

Bug #835703 reported by Brian Shumate on 2011-08-27
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Beautiful Soup

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............done.
Installing pip...............done.
bshumate@urkel ~: cd test
bshumate@urkel ~/test: source bin/activate
(test)bshumate@urkel ~/test: pip install BeautifulSoup
Downloading/unpacking BeautifulSoup
  Downloading BeautifulSoup-4.0b.tar.gz (42Kb): 42Kb downloaded
  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@urkel ~/test: python
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.

Leonard Richardson (leonardr) wrote :

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.

Changed in beautifulsoup:
status: New → Won't Fix
Brian Shumate (bshumate) wrote :

sorry about the false alarm and apologies for not RTFR! Thanks for the work re: pip! :)

Leonard Richardson (leonardr) wrote :

No problem, your bug was useful because people have been installing the 4.0 beta without meaning to and I had no idea how that was happening.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers