如何安装最新版本的 TensorFlow 2?
How to install the latest version of TensoFlow 2?
我想知道为什么我无法安装 TensorFlow 2.0.0(到目前为止的稳定版本 in their official website even in PyPi)
我曾经使用过 TensorFlow 2.0.0b1
版本,但由于我的 numpy
版本与 TensorFlow 不兼容,所以我遇到了几个警告。它是 1.17
并且必须是 1.16.4
()。因此,我降级了它,但 TensorFlow 不再工作了。所以我决定重新安装上面提到的TensorFlow最新稳定版。
这是我到目前为止所做的:
pip install -U tensorflow
从 1.14
到 pip show tensorflow
pip install tensorflow
从 1.14
到 pip show tensorflow
pip install tensorflow==2.0
pip install tensorflow==2.0.0
pip install 'tensorflow>=2'
他们返回以下错误:
Could not find a version that satisfies the requirement tensorflow==2.0.0 (from versions: 0.12.1, 1.0.0, 1.0.1, 1.1.0rc0, 1.1.0rc1, 1.1.0rc2, 1.1.0, 1.2.0rc0, 1.2.0rc1, 1.2.0rc2, 1.2.0, 1.2.1, 1.3.0rc0, 1.3.0rc1, 1.3.0rc2, 1.3.0, 1.4.0rc0, 1.4.0rc1, 1.4.0, 1.4.1, 1.5.0rc0, 1.5.0rc1, 1.5.0, 1.5.1, 1.6.0rc0, 1.6.0rc1, 1.6.0, 1.7.0rc0, 1.7.0rc1, 1.7.0, 1.7.1, 1.8.0rc0, 1.8.0rc1, 1.8.0, 1.9.0rc0, 1.9.0rc1, 1.9.0rc2, 1.9.0, 1.10.0rc0, 1.10.0rc1, 1.10.0, 1.10.1, 1.11.0rc0, 1.11.0rc1, 1.11.0rc2, 1.11.0, 1.12.0rc0, 1.12.0rc1, 1.12.0rc2, 1.12.0, 1.12.2, 1.12.3, 1.13.0rc0, 1.13.0rc1, 1.13.0rc2, 1.13.1, 1.13.2, 1.14.0rc0, 1.14.0rc1, 1.14.0, 2.0.0a0, 2.0.0b0, 2.0.0b1)
No matching distribution found for tensorflow==2.0.0
[注意]:
OS: Ubuntu 16.04
Python: 3.6.8
numpy: 1.16.4
pip3 版本:18.1
[2020 年 10 月更新]:
显然,这个问题已经解决了,因为我现在可以在 [=67= 上毫无问题地安装 tensorflow 2.3.1 ] 16.04 Xenial.
为了社区的利益,在此部分中提及解决方案(即使在评论部分中提及)。
以下任一步骤都可以解决问题:
- 使用
Tensorflow
版本,2.0.0b1
用于Ubuntu版本16.04(Xenial Xerus)或
- 通过将 Ubuntu OS 版本从
16.04 (Xenial Xerus)
升级到 18.04 (Bionic Beaver)
,我们可以安装最新的 Tensorflow Version
.
我想知道为什么我无法安装 TensorFlow 2.0.0(到目前为止的稳定版本 in their official website even in PyPi)
我曾经使用过 TensorFlow 2.0.0b1
版本,但由于我的 numpy
版本与 TensorFlow 不兼容,所以我遇到了几个警告。它是 1.17
并且必须是 1.16.4
(
这是我到目前为止所做的:
pip install -U tensorflow
从 1.14
到 pip show tensorflow
pip install tensorflow
从 1.14
到 pip show tensorflow
pip install tensorflow==2.0
pip install tensorflow==2.0.0
pip install 'tensorflow>=2'
他们返回以下错误:
Could not find a version that satisfies the requirement tensorflow==2.0.0 (from versions: 0.12.1, 1.0.0, 1.0.1, 1.1.0rc0, 1.1.0rc1, 1.1.0rc2, 1.1.0, 1.2.0rc0, 1.2.0rc1, 1.2.0rc2, 1.2.0, 1.2.1, 1.3.0rc0, 1.3.0rc1, 1.3.0rc2, 1.3.0, 1.4.0rc0, 1.4.0rc1, 1.4.0, 1.4.1, 1.5.0rc0, 1.5.0rc1, 1.5.0, 1.5.1, 1.6.0rc0, 1.6.0rc1, 1.6.0, 1.7.0rc0, 1.7.0rc1, 1.7.0, 1.7.1, 1.8.0rc0, 1.8.0rc1, 1.8.0, 1.9.0rc0, 1.9.0rc1, 1.9.0rc2, 1.9.0, 1.10.0rc0, 1.10.0rc1, 1.10.0, 1.10.1, 1.11.0rc0, 1.11.0rc1, 1.11.0rc2, 1.11.0, 1.12.0rc0, 1.12.0rc1, 1.12.0rc2, 1.12.0, 1.12.2, 1.12.3, 1.13.0rc0, 1.13.0rc1, 1.13.0rc2, 1.13.1, 1.13.2, 1.14.0rc0, 1.14.0rc1, 1.14.0, 2.0.0a0, 2.0.0b0, 2.0.0b1)
No matching distribution found for tensorflow==2.0.0
[注意]:
OS: Ubuntu 16.04
Python: 3.6.8
numpy: 1.16.4
pip3 版本:18.1
[2020 年 10 月更新]:
显然,这个问题已经解决了,因为我现在可以在 [=67= 上毫无问题地安装 tensorflow 2.3.1 ] 16.04 Xenial.
为了社区的利益,在此部分中提及解决方案(即使在评论部分中提及)。
以下任一步骤都可以解决问题:
- 使用
Tensorflow
版本,2.0.0b1
用于Ubuntu版本16.04(Xenial Xerus)或 - 通过将 Ubuntu OS 版本从
16.04 (Xenial Xerus)
升级到18.04 (Bionic Beaver)
,我们可以安装最新的Tensorflow Version
.