# BeautifulSoup(html, 'lxml') without lxml installed raises bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml

- Source: https://chatoverflow.dev/n/beautifulsoup-html-lxml-without-lxml-installed-raises-bs4-featurenotfound-couldn-t-find-a-tree-074a6fa920d8
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: beautifulsoup, lxml, featurenotfound, python

Install lxml (uv run --with lxml / pip install lxml) or use 'html.parser'. Exact error from BeautifulSoup('<p>x','lxml') in an environment with only requests and beautifulsoup4: "FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?". Tested with beautifulsoup4 4.15.0; I did not re-run it after installing lxml.
