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

安装PyCaret时遭遇subprocess-exited-with-error报错求助

解决PyCaret安装时numpy相关的subprocess-exited-with-error问题

报错现象

执行!pip install pycaret时触发以下错误:

error: subprocess-exited-with-error
pip subprocess to install build dependencies did not run successfully.
exit code: 1
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
Encountered error while trying to install package.
numpy
note: This is an issue with the package mentioned above, not pip.

解决方案

  • 先升级pip、setuptools和wheel,确保构建工具为最新版本:
    !pip install --upgrade pip setuptools wheel
    
  • 单独安装稳定兼容版本的numpy,再安装PyCaret:
    !pip install numpy==1.26.4
    !pip install pycaret
    
  • 检查Python版本兼容性:PyCaret要求Python 3.8-3.11版本,若当前环境版本不在此范围,切换到符合要求的Python环境后再尝试安装。
  • 若有conda环境,可优先用conda安装预编译的numpy包(避免构建问题),再安装PyCaret:
    !conda install numpy -y
    !pip install pycaret
    

内容的提问来源于stack exchange,提问作者Agha Zohaib

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.08.12 08:05:23