首页 > 解决方案 > pip 找不到 tensorflow 2.0 或 2.1

问题描述

愚蠢的我问这样一个问题(在这里也问过1 , 2)。我尝试在 Ubuntu 系统上为 mask-rcnn 包安装 TensorFlow 2.0 或 2.1,但 pip 找不到我迫切需要的 TensorFlow 版本。你能告诉我为什么 pip 找不到 tf2.0 或 tf2.1 吗?那么如何安装tf2.0或tf2.2呢?

albert@GIGABYTE:~$ pip install tensorflow==2.0
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement tensorflow==2.0 (from versions: 2.2.0rc1, 2.2.0rc2, 2.2.0rc3, 2.2.0rc4, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.3.0rc0, 2.3.0rc1, 2.3.0rc2, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.4.0rc0, 2.4.0rc1, 2.4.0rc2, 2.4.0rc3, 2.4.0rc4, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 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)
ERROR: No matching distribution found for tensorflow==2.0

标签: pythontensorflowpip

解决方案


tensorflow 2.0tensorflow 2.1需要 Python 2.7 和 3.4-3.7 但不是更高版本。您的 Python 似乎是更高版本(来自 tensorflow 版本列表,我认为您使用的是 3.8)。降级 Python 或使用更高版本的 tensorflow。


推荐阅读