Importing bs4 in Python 3.5

Update: BeautifulSoup 4.4.0 has been updated to be python3.5 compatible, so a pip install --upgrade beautifulsoup4 should do the trick if you are still hitting this issue.


Update: Starting with 4.4.0, BeautifulSoup is compatible with Python 3.5. Upgrade:

pip install --upgrade beautifulsoup4

Old answer:

Because of the changes made for Deprecate strict mode of HTMLParser issue:

Issue #15114: the strict mode and argument of HTMLParser, HTMLParser.error, and the HTMLParserError exception have been removed.

I'm afraid beautifulSoup4 is not compatible with Python 3.5 at the moment. Use Python 3.4.