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加载:重启编辑器或执行仓库依赖同步操作。
错误截图

内容的提问来源于stack exchange,提问作者Max Magid
相关产品推荐
相关产品推荐

