现象:
在2025-06-27 安装 unstructured 包时,报错Building wheel for lxml (pyproject.toml) did not run successfully.
报错信息
Building wheel for lxml (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [4856 lines of output]
Building lxml version 6.0.0.
Building without Cython.
Building against libxml2 2.9.1 and libxslt 1.1.28
running bdist_wheel
running build
running build_py
…………
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for lxml
Failed to build lxml
ERROR: Could not build wheels for lxml, which is required to install pyproject.toml-based projects
Python版本
python 3.8
unstructured版本
unstructured==0.11.8
原因
在2025-06-27 lxml更新了6.0 版本,unstructured安装lxml依赖时没指定包版本,安装了lxml的6.0版本,但是lxml构建失败导致安装unstructured报错
解决方法
在unstructured安装前指定lxml版本(上一个版本为lxml == 5.4.0
),如:
lxml==5.4.0
unstructured==0.11.8
1万+

被折叠的 条评论
为什么被折叠?



