无法将 Tensorflow 2.4.1 安装为 OpenVino 的依赖项

Cannot install Tensorflow 2.4.1 as a dependency for OpenVino

按照记录 here 完成安装 OpenVino 的过程时,我 运行:

sudo ./install_prerequisites.sh

得到

ERROR: Could not find a version that satisfies the requirement tensorflow~=2.4.1 (from versions: 2.5.0rc0, 2.5.0rc1, 2.5.0rc2, 2.5.0rc3, 2.5.0, 2.5.1, 2.5.2, 2.6.0rc0, 2.6.0rc1, 2.6.0rc2, 2.6.0, 2.6.1, 2.6.2, 2.7.0rc0, 2.7.0rc1, 2.7.0, 2.8.0rc0)
ERROR: No matching distribution found for tensorflow~=2.4.1

如文档中所述,如果出现错误,您可以单独配置框架。但是,即使使用 pip 似乎也没有 Tensorflow 2.4.1 的匹配分布:

pip install tensorflow==2.4.1

ERROR: No matching distribution found for tensorflow==2.4.1

如何安装 Tensorflow 2.4.1?

我已经 介绍了如何调试此类问题。好吧,让我们看看。

tensorflow 2.4.1 includes wheels for Python 3.6-3.8. No 3.9 and no source code. Wheels for Python 3.9 are available starting from tensorflow 2.5.0rc0 的可用包列表 — 与错误消息中所述完全相同。

你能做什么? 1) 再次降级到 Python 3.8。或者 2) 使用更新的 OpenVino 源代码; GitHub list tensorflow~=2.5 的当前资源作为依赖项。或者 3) 在您下载的源文件中找到 requirements*.txt 并将版本 tensorflow~=2.4.1 替换为 2.5.0.