Where is BeautifulSoup4 hiding?

Try import bs4. It’s unfortunate there’s no correspondence between PyPI package name and import name. After that the class names are the same as before eg. soup = bs4.BeautifulSoup(doc) will work.

If that still doesn’t work, try pip install again and note the path to the package install. Then in your python console run import sys and print sys.path to make sure that the path is there.

You might need to explicitly specify pip-2.7 or switch to easy_install (or easy_install-2.7)

Leave a Comment