InvalidTemplateLibraryError on initial runserver using wagtail
Question: Everytime i do `python manage.py runserver` an error said

> Invalid template library specified.
>
> ImportError raised when trying to load
> 'wagtail.wagtailcore.templatetags.wagtailcore_tags': cannot import name
> _htmlparser


Answer: There is some bug with new version of html5lib. I found two solutions for this
problem:

  1. Downgrade html5lib (I tried with version 0.9999999)

> pip uninstall html5lib  
>  pip install html5lib==0.9999999

After downgrade everything seems to work perfectly.

  2. Temporary fix by editing beautifulsoup4 package file

> <path_to_your_virtualenv>/lib/python2.7/site-
> packages/bs4/builder/__init__.py

At the end of a file you need to comment out next lines:

    
    
    from . import _htmlparser
    register_treebuilders_from(_htmlparser)
    try:
        from . import _html5lib
        register_treebuilders_from(_html5lib)
    except ImportError:
        # They don't have html5lib installed.
        pass
    

After you comment them out wagtail will properly start.

_P.S. I prefer first option._

**Edit 1:**

Found open GitHub issue: <https://github.com/html5lib/html5lib-
python/issues/276>

