Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing BeautifulSoup on Mac OSX

I have tried everything here: How can I install the Beautiful Soup module on the Mac?

Installation seems to work (getting correct output during install) from both the traditional way to install and also using easy_install but when I use:

from bs4 import BeautifulSoup

the interpreter says no such module exists.

What should I look at first to troubleshoot this?

like image 380
Fusilli Jerry Avatar asked Nov 11 '12 15:11

Fusilli Jerry


1 Answers

To see all the packages you have installed, you can run the following in a interpreter:

>>> help('modules')

That will list for you all the modules you have installed. Look for bs4 in the list (which seems to be alphabetical). Another option is to issue at your prompt:

$ python -c "help('modules')" | grep bs4

If nothing comes up, or you cannot find it in the list, the module is not installed.

To install it, I used sudo pip install bs4. You may need to run sudo easy_install pip first to get pip. Also note the use of sudo, as this may make a difference.

And I'm running 10.8 build version 12C60.

like image 178
Whymarrh Avatar answered Oct 22 '22 01:10

Whymarrh