I installed BeautifulSoup with the command:
sudo easy_install BeautifulSoup4
I got a message:
Searching for BeautifulSoup4 Best match: beautifulsoup4 4.1.3 Processing beautifulsoup4-4.1.3-py2.6.egg beautifulsoup4 4.1.3 is already the active version in easy-install.pth Using /Library/Python/2.6/site-packages/beautifulsoup4-4.1.3-py2.6.egg Processing dependencies for BeautifulSoup4 Finished processing dependencies for BeautifulSoup4
I am trying to import the BeautifulSoup library.
>>> from BeautifulSoup import BeautifulSoup Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named BeautifulSoup
or
>>> from bs4 import BeautifulSoup Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named bs4
My Python version:
python --version Python 2.7.3
EDIT
I understand that:
Using /Library/Python/2.6/site-packages/beautifulsoup4-4.1.3-py2.6.egg
May indicate a conflict between versions of Python
How can I register this module? Thanks
source share