How to install the latest version of TensoFlow 2?

寵の児 提交于 2020-03-16 06:38:12

问题


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

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

It trow backs 1.14 through pip show tensorflow

pip install tensorflow

It trow backs 1.14 through pip show tensorflow

pip install tensorflow==2.0
pip install tensorflow==2.0.0
pip install 'tensorflow>=2' 

They trow back the following error:

  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

[NOTE]:

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


回答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. 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.


来源:https://stackoverflow.com/questions/59500220/how-to-install-the-latest-version-of-tensoflow-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!