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

Google Colab安装ISR包时出现TensorFlow版本匹配错误

解决ISR安装时TensorFlow版本不匹配问题

问题原因

ISR的PyPI包依赖TensorFlow 2.0.0,但当前pip源已移除该版本,导致安装失败。

解决方案

方法1:跳过依赖检查安装ISR,适配Colab的TensorFlow版本

先安装ISR并忽略依赖限制,再安装Colab支持的稳定TensorFlow版本:

!pip install ISR --no-deps
!pip install tensorflow==2.10.1

方法2:安装ISR最新开发版

直接安装GitHub上的最新代码,该版本已兼容更高版本的TensorFlow:

!pip install git+https://github.com/idealo/image-super-resolution.git

方法3:切换Python环境安装旧版TensorFlow(备选)

若需使用旧版ISR,先将Colab切换到Python 3.7环境,再安装TensorFlow 2.0.0:

!pip install tensorflow==2.0.0

验证安装

安装完成后,执行以下代码确认ISR可正常运行:

from ISR.models import RDN
model = RDN(weights='psnr-small')

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.08.07 23:05:23