~ $ pip install beautifulsoup4
Collecting beautifulsoup4
Using cached beautifulsoup4-4.6.0-py2-none-any.whl
Installing collected packages: beautifulsoup4
Successfully installed beautifulsoup4-4.6.0
~ $ python
Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 26 2016, 12:10:39)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys, os, getopt, traceback, codecs, re
>>> from bs4 import BeautifulSoup
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named bs4
the module is getting successfully installed, because when I run pip freeze, one of the outputs is:
beautifulsoup4==4.6.0
I'd really appreciate your help, thanks!