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

执行pip install -e smac报错Command errored out with exit status 1如何解决

解决方案

错误原因是pip无法连接官方PyPI源下载构建依赖,可按以下方案解决:

  • 临时替换国内PyPI源单次安装
    直接在安装命令后追加国内镜像源参数即可,仅对当前命令生效:
    pip install -e smac/ -i https://pypi.tuna.tsinghua.edu.cn/simple
    
  • 配置全局PyPI镜像源
    长期解决pip连接失败/下载慢的问题,可修改全局配置:
    1. 创建pip配置目录
    mkdir -p ~/.pip
    
    1. 编辑~/.pip/pip.conf配置文件,写入以下内容:
    [global]
    index-url = https://pypi.tuna.tsinghua.edu.cn/simple
    trusted-host = pypi.tuna.tsinghua.edu.cn
    
    配置完成后重新执行原安装命令即可。
  • 先手动安装构建依赖
    先单独安装报错提示缺失的setuptools和wheel依赖,再安装SMAC:
    pip install 'setuptools>=40.8.0' wheel -i https://pypi.tuna.tsinghua.edu.cn/simple
    pip install -e smac/
    
  • 配置代理(如有可用代理)
    如果你有可用的网络代理,可在安装命令中追加代理参数:
    pip install -e smac/ --proxy http://<代理地址>:<代理端口>
    

内容的提问来源于stack exchange,提问作者Brown Sugar

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.09.26 10:36:01