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

Foundry代码仓库中Code Assist报transforms-python:runVersions错误原因

Foundry Code Assist加载失败及Python 2.7依赖问题解决指南

核心问题

报错nothing provides openssl 1.0.2d needed by python-2.7.11-0是根源:Python 2.7.11依赖的OpenSSL 1.0.2d在当前Foundry环境中无匹配包,导致transforms-python:runVersions检测失败,最终Code Assist无法加载。Python 2.7已停止维护,现代Foundry环境默认不再支持这类老旧依赖链。

可行解决方案

1. 升级Python版本(最优方案)

  • 切换仓库Python版本到3.8+(Foundry官方推荐的稳定兼容版本):
    编辑仓库根目录的requirements.txt,添加版本约束:
    python>=3.8,<3.11
    
  • 重新同步依赖,Foundry会自动适配当前环境的OpenSSL版本,彻底解决老旧依赖缺失问题。

2. 临时兼容老旧依赖(不推荐)

若必须保留Python 2.7,需手动指定OpenSSL依赖:

  • 在requirements.txt中添加:
    openssl==1.0.2d
    

⚠️ 注意:OpenSSL 1.0.2d存在大量未修复的安全漏洞,仅作为临时应急方案,不建议长期使用。

3. 校准transforms-python版本

  • 检查仓库foundry.toml中的transforms-python版本,确保与Python版本兼容:
    [transforms-python]
    version = ">=1.0.0,<2.0.0"  # 对应Python 2.7的兼容版本范围
    
  • 重新触发Code Assist加载:重启编辑器或执行仓库依赖同步操作。

错误截图

Code Assist加载失败报错截图

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.25 08:22:08