crawl4ai version
0.8.6
Summary
Crawl4AI installation fails in Python 3.14 environment due to lxml~=5.3.
Using lxml 6.0.2 works!
AI Analysis
pip install crawl4ai fails on Windows with Python 3.14 due to lxml~=5.3 source build error
Body
Describe the bug
Installing crawl4ai on Windows with Python 3.14 fails during dependency installation when pip tries to build lxml from source.
The failure appears related to Crawl4AI depending on lxml~=5.3, which resolves to lxml 5.4.0 in my environment. On Windows + Python 3.14, pip does not appear to find a compatible wheel and falls back to a native source build, which then fails because libxml2 headers/libraries are not available.
To Reproduce
- On Windows, create a fresh virtual environment with Python 3.14
- Run:
- Installation fails while building
lxml
Expected behavior
pip install crawl4ai should either:
- install successfully on Python 3.14, or
- fail early with a clear message that Python 3.14 is not currently supported
Actual behavior
Installation fails while building lxml from source.
Error output
Building wheels for collected packages: lxml
Building wheel for lxml (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for lxml (pyproject.toml) did not run successfully.
│ exit code: 1
...
fatal error C1083: Cannot open include file: 'libxml/xmlversion.h': No such file or directory
Compile failed: command '...\\cl.exe' failed with exit code 2
...
fatal error C1083: Cannot open include file: 'libxml/xpath.h': No such file or directory
*********************************************************************************
Could not find function xmlXPathInit in library libxml2. Is libxml2 installed?
Is your C compiler installed and configured correctly?
*********************************************************************************
ERROR: Failed building wheel for lxml
Failed to build lxml
error: failed-wheel-build-for-install
× Failed to build installable wheels for some pyproject.toml based projects
╰─> lxml
Environment
- OS: Windows 11
- Python: 3.14.2
- pip: latest available at time of test
- Compiler/tooling: Visual Studio 2022 C++ tools detected in build log
Additional context
Current Crawl4AI PyPI metadata appears to declare:
Requires-Python: >=3.10
- Python classifiers for:
But not 3.14.
Current dependency metadata also includes:
So this may be a Python 3.14 compatibility gap caused by the current lxml version range, rather than a general Windows install problem.
Suggested fix
Possible options:
- Explicitly document that Python 3.14 is not yet supported
- Add a clearer install-time guard or message for unsupported Python versions
- Relax/update the
lxml dependency if a newer version line works with Python 3.14
- Document a recommended Python version such as 3.12 or 3.13 for Windows users
Workaround
Using Python 3.12 or 3.13 appears to be the safest workaround.
Current Behavior
Installation fails with error.
Is this reproducible?
Yes
OS
Windows
Python version
3.14
Browser
No response
Browser version
No response
Error logs & Screenshots (if applicable)
No response
crawl4ai version
0.8.6
Summary
Crawl4AI installation fails in Python 3.14 environment due to
lxml~=5.3.Using
lxml 6.0.2works!AI Analysis
pip install crawl4aifails on Windows with Python 3.14 due tolxml~=5.3source build errorBody
Describe the bug
Installing
crawl4aion Windows with Python 3.14 fails during dependency installation whenpiptries to buildlxmlfrom source.The failure appears related to Crawl4AI depending on
lxml~=5.3, which resolves tolxml 5.4.0in my environment. On Windows + Python 3.14,pipdoes not appear to find a compatible wheel and falls back to a native source build, which then fails becauselibxml2headers/libraries are not available.To Reproduce
lxmlExpected behavior
pip install crawl4aishould either:Actual behavior
Installation fails while building
lxmlfrom source.Error output
Environment
Additional context
Current Crawl4AI PyPI metadata appears to declare:
Requires-Python: >=3.10But not 3.14.
Current dependency metadata also includes:
So this may be a Python 3.14 compatibility gap caused by the current lxml version range, rather than a general Windows install problem.
Suggested fix
Possible options:
lxmldependency if a newer version line works with Python 3.14Workaround
Using Python 3.12 or 3.13 appears to be the safest workaround.
Current Behavior
Installation fails with error.
Is this reproducible?
Yes
OS
Windows
Python version
3.14
Browser
No response
Browser version
No response
Error logs & Screenshots (if applicable)
No response