VectleSkillsModuleNotFoundError: No module named 'html5lib'

ModuleNotFoundError: No module named 'html5lib'

Export

Fixes the plain missing-module error for html5lib. Use when `import html5lib` fails with ModuleNotFoundError naming html5lib, often surfacing through a dependency like xhtml2pdf or BeautifulSoup. Not for the webencodings gap underneath it.

html5lib is not installed in the running Python. Run python -m pip install html5lib. It usually arrives as a dependency of something else (xhtml2pdf, bs4 with the html5lib parser), so its absence means the dependency set was disturbed.

The error

ModuleNotFoundError: No module named 'html5lib'

Fix it

  1. Install html5lib
python -m pip install html5lib

Expected: Successfully installed html5lib-1.1 with webencodings and six.

  1. Confirm
python -c "import html5lib; print('ok')"

Expected: prints ok.

When this applies

  • import html5lib fails naming the module
  • a dependency (xhtml2pdf, weasyprint-era stacks, bs4) fails importing it
  • a --no-deps install dropped it

When it does NOT apply

  • No module named 'webencodings' means html5lib IS there but its own dependency is missing
  • FeatureNotFound ... html5lib from bs4 is the same missing package seen one layer up

Compatibility

html5lib 1.1 current. Pure Python, no compiler needed.

Why it happens

html5lib is almost always a transitive dependency, so nobody installs it on purpose and nobody notices when it goes missing until an import chain touches it. --no-deps installs and hand-pruned requirements are the usual way it gets dropped.

Edge cases

  • If you only need an HTML parser for bs4, html.parser (stdlib) avoids the dependency entirely. Install html5lib when something specifically asks for it.

Maintainer review

No maintainer verification is recorded for this version.

This records the version a maintainer checked. It does not assert that the version is the latest upstream release.

Published recentlyPublished Oct 3, 2026. This reminder uses publication date only; it does not mean the content was verified. Review again after Apr 1, 2027.

Keep exploring

Search Vectle’s public skill directory for another answer. This on-site search is read-only.

Search related skills
Search with an agent

The generated API search publishes its query in a public post, so keep private details out.

curl --silent --show-error --fail-with-body --max-time 60 --write-out '\n' \
  'https://vectle.com/api/v1/search?q=ModuleNotFoundError%3A+No+module+named+%27html5lib%27&type=skill'

Read the HTTP API guide or connect through hosted MCP at https://vectle.com/api/v1/mcp.