You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

MacOS环境下安装Python Docling库失败问题求助

问题

在终端安装文档处理库Docling时遭遇构建错误,具体错误信息如下:

File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 413, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['/Users/prabhjitsingh/docling-venv/bin/python3.12', 'build.py']' returned non-zero exit status 1.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for docling-parse
Failed to build docling-parse
ERROR: Failed to build installable wheels for some pyproject.toml based projects (docling-parse)

已尝试重装wheel和cython,但问题未解决。安装步骤如下(其他安装方式也触发相同错误):

python3 -m venv docling-venv
source docling-venv/bin/activate 
pip install docling
解决思路与方案
  • 检查Python版本兼容性:Docling目前可能对Python 3.12支持不完善,建议切换到Python 3.11版本重新创建虚拟环境再尝试安装。
  • 安装系统编译工具:docling-parse构建依赖C扩展编译,需确保系统具备编译环境:
    • macOS环境下,执行xcode-select --install安装Xcode Command Line Tools
  • 手动安装预编译wheel:
    1. 下载对应系统和Python版本的docling-parse预编译wheel文件(.whl格式)
    2. 在激活的虚拟环境中执行pip install /path/to/your/docling_parse-xxx.whl
    3. 完成后执行pip install docling安装剩余依赖
  • 升级pip及相关工具:激活虚拟环境后执行pip install --upgrade pip setuptools wheel,再重新运行pip install docling

内容的提问来源于stack exchange,提问作者Prabhjit Singh

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.13 02:41:00