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

安装Fooocus依赖时遇Getting requirements to build wheel错误求助

解决PyYAML安装时AttributeError: cython_sources错误

快速解决方案

  • 先升级pip、setuptools和wheel,确保工具为最新版本:
    pip install --upgrade pip setuptools wheel
    
  • 安装预编译的PyYAML包,跳过编译步骤(适合Windows环境,无需配置C编译环境):
    pip install pyyaml --only-binary :all:
    
  • 重新安装项目依赖:
    pip install -r requirements_versions.txt
    

备选方案

如果上述方法无效,可尝试:

  1. 先单独安装PyYAML,再安装项目依赖:
    pip install pyyaml
    pip install -r requirements_versions.txt
    
  2. 确认虚拟环境已正确激活:
    aitest\Scripts\activate
    

错误原因说明

这个错误发生在PyYAML编译环节,要么是PyYAML旧版本与新版setuptools存在兼容性冲突,要么是当前环境缺少Cython编译依赖。使用预编译的二进制包可以直接跳过编译流程,避免触发该错误。

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.05 00:02:25