如何安装最新版本的TensoFlow 2? [英] How to install the latest version of TensoFlow 2?

查看:210
本文介绍了如何安装最新版本的TensoFlow 2?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道为什么我不能安装 TensorFlow 2.0.0 (到目前为止是稳定的版本 )

I am wondering that why I cannot install the TensorFlow 2.0.0 (stable version until now in their official website even in PyPi)

我曾经使用过TensorFlow 2.0.0b1版本,但是由于我的numpy版本与TensorFlow不兼容,所以我正在处理一些警告.它是1.17并且必须是1.16.4(

I used to had the TensorFlow 2.0.0b1 version, but I was dealing with several warnings because my numpy version wasn't compatible with the TensorFlow. It was 1.17 and must be 1.16.4 (Reference). Hence, I downgrade it but TensorFlow didn't work anymore. So I decide to reinstall the TensorFlow latest stable version as mentioned above.

到目前为止,我已经完成了:

Here is I've done so far:

pip install -U tensorflow

它从pip show tensorflow退回1.14

pip install tensorflow

它从pip show tensorflow退回1.14

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


[注意]:

操作系统:Ubuntu 16.04
Python:3.6.8
numpy:1.16.4
pip3版本:18.1

OS: Ubuntu 16.04
Python: 3.6.8
numpy: 1.16.4
pip3 version: 18.1

推荐答案

为了社区的利益,在本节中提及该解决方案(即使在注释"部分中已提及).

Mentioning the solution in this section (even though it is mentioned in the Comments Section), for the benefit of the community.

以下任何步骤都可以解决该问题:

Any of the below steps will resolve the issue:

  1. 对于Ubuntu版本16.04(Xenial Xerus),使用Tensorflow版本,2.0.0b1
  2. 通过将Ubuntu OS版本从16.04 (Xenial Xerus)升级到18.04 (Bionic Beaver),我们可以安装最新的Tensorflow Version.
  1. Using the Tensorflow Version, 2.0.0b1 for the Ubuntu Version 16.04 (Xenial Xerus) Or
  2. By upgrading the Ubuntu OS Version from 16.04 (Xenial Xerus) to 18.04 (Bionic Beaver), we can install the Latest Tensorflow Version.

这篇关于如何安装最新版本的TensoFlow 2?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆