installed bs4 but ImportError: No module named beautifulsoup4

1,922 views
Skip to first unread message

tom wible

unread,
Jan 29, 2015, 1:33:17 PM1/29/15
to beauti...@googlegroups.com
> pip install beautifulsoup4
Requirement already satisfied (use --upgrade to upgrade): beautifulsoup4 in /Library/Python/2.7/site-packages
tomw> python
Python 2.7.9 (default, Jan 23 2015, 19:53:07)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys, os, getopt, traceback, codecs, re
>>> from beautifulsoup4 import BeautifulSoup, NavigableString
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named beautifulsoup4

and

> sudo easy_install beautifulsoup4
Password:
Searching for beautifulsoup4
Best match: beautifulsoup4 4.3.2
Adding beautifulsoup4 4.3.2 to easy-install.pth file

Using /Library/Python/2.7/site-packages
Processing dependencies for beautifulsoup4
Finished processing dependencies for beautifulsoup4
> python
Python 2.7.9 (default, Jan 23 2015, 19:53:07)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys, os, getopt, traceback, codecs, re
>>> from beautifulsoup4 import BeautifulSoup, NavigableString
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named beautifulsoup4

now wtf???

leonardr

unread,
Jan 29, 2015, 1:48:31 PM1/29/15
to beauti...@googlegroups.com
Tom,

The package name is "bs4", not "beautifulsoup4".

http://www.crummy.com/software/BeautifulSoup/bs4/doc/#making-the-soup

Best,
Leonard

Hari Krishnan

unread,
Feb 20, 2015, 2:39:34 PM2/20/15
to beauti...@googlegroups.com
Try
from bs4 import BeautifulSoup
Reply all
Reply to author
Forward
0 new messages