1

I installed BeautifulSoup4 using pip in OSX but I yet get this error:

dyn-72-33-214-45:craiglist mona$ python t1.py 
Traceback (most recent call last):
  File "t1.py", line 1, in <module>
    from bs4 import BeautifulSoup
ImportError: No module named bs4

Any idea how to fix it?

dyn-72-33-214-45:craiglist mona$ pip install BeautifulSoup4
....
Successfully installed BeautifulSoup4
Cleaning up...
Mona Jalal
  • 34,860
  • 64
  • 239
  • 408

1 Answers1

3

I installed it using easy_install and now it is working. However first you should use sudo su :

dyn-72-33-214-45:craiglist mona$ sudo su
sh-3.2# easy_install beautifulsoup4
Mona Jalal
  • 34,860
  • 64
  • 239
  • 408