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

```text
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.

2. **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.
