unstructured 包安装报错 Building wheel for lxml (pyproject.toml) did not run successfully.

现象:

在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
Building wheel for pmdarima (pyproject.toml): started Building wheel for pmdarima (pyproject.toml): finished with status 'error' Failed to build pmdarima error: subprocess-exited-with-error × Building wheel for pmdarima (pyproject.toml) did not run successfully. exit code: 1 ╰─> [43 lines of output] Partial import of pmdarima during the build process. Requirements: ['joblib>=0.11\nCython>=0.29,!=0.29.18,!=0.29.31\nnumpy>=1.21.2\npandas>=0.19\nscikit-learn>=0.22\nscipy>=1.3.2\nstatsmodels>=0.13.2\nurllib3\nsetuptools>=38.6.0,!=50.0.0\npackaging>=17.1 # Bundled with setuptools, but want to be explicit\n'] Adding extra setuptools args Setting up with setuptools Traceback (most recent call last): File "C:\Users\p052690\AppData\Local\anaconda3\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 389, in <module> main() ~~~~^^ File "C:\Users\p052690\AppData\Local\anaconda3\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 373, in main json_out["return_val"] = hook(**hook_input["kwargs"]) ~~~~^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\p052690\AppData\Local\anaconda3\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 280, in build_wheel return _build_backend().build_wheel( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ wheel_directory, config_settings, metadata_directory ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "C:\Users\p052690\AppData\Local\Temp\pip-build-env-owecr2_r\overlay\Lib\site-packages\setuptools\build_meta.py", line 435, in build_wheel return _build(['bdist_wheel', '--dist-info-dir', str(metadata_directory)]) File "C:\Users\p052690\AppData\Local\Temp\pip-build-env-owecr2_r\overlay\Lib\site-packages\setuptools\build_meta.py", line 423, in _build return self._build_with_temp_dir( ~~~~~~~~~~~~~~~~~~~~~~~~~^ cmd, ^^^^ ...<3 lines>... self._arbitrary_args(config_settings), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "C:\Users\p052690\AppData\Local\Temp\pip-build-env-owecr2_r\overlay\Lib\site-packages\setuptools\build_meta.py", line 404, in _build_with_temp_dir self.run_setup() ~~~~~~~~~~~~~~^^ File "C:\Users\p052690\AppData\Local\Temp\pip-build-env-owecr2_r\overlay\Lib\site-packages\setuptools\build_meta.py", line 512, in run_setup super().run_setup(setup_script=setup_script) ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\p052690\AppData\Local\Temp\pip-build-env-owecr2_r\overlay\Lib\site-packages\setuptools\build_meta.py", line 317, in run_setup exec(code, locals()) ~~~~^^^^^^^^^^^^^^^^ File "<string>", line 371, in <module> File "<string>", line 330, in do_setup ModuleNotFoundError: No module named 'numpy' [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pmdarima ERROR: Failed to build installable wheels for some pyproject.toml based projects (pmdarima) 下载pmdarima时报错了怎么回事
09-18
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

无糖可乐·

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值