pip3 install tensorflow-gpu安装tensorflow版本1.14.0

杰菲米

我正在尝试安装Tensorflow 2.0。这些是我正在运行的命令:

$ pip3 install tensorflow-gpu

当我打开Python控制台时(在Jetbrains PyCharm中)

import tensorflow as tf

我立即遭到一堆弃用警告的打击:

/home/jason/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/home/jason/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/home/jason/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/home/jason/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/home/jason/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/home/jason/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
/home/jason/.local/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/home/jason/.local/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/home/jason/.local/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/home/jason/.local/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/home/jason/.local/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/home/jason/.local/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
WARNING:tensorflow:From /home/jason/.local/share/JetBrains/Toolbox/apps/PyCharm-C/ch-0/193.5233.109/plugins/python-ce/helpers/pydev/_pydevd_bundle/pydevd_resolver.py:178: The name tf.AUTO_REUSE is deprecated. Please use tf.compat.v1.AUTO_REUSE instead.
WARNING:tensorflow:From /home/jason/.local/share/JetBrains/Toolbox/apps/PyCharm-C/ch-0/193.5233.109/plugins/python-ce/helpers/pydev/_pydevd_bundle/pydevd_resolver.py:178: The name tf.AttrValue is deprecated. Please use tf.compat.v1.AttrValue instead.
WARNING:tensorflow:From /home/jason/.local/share/JetBrains/Toolbox/apps/PyCharm-C/ch-0/193.5233.109/plugins/python-ce/helpers/pydev/_pydevd_bundle/pydevd_resolver.py:178: The name tf.COMPILER_VERSION is deprecated. Please use tf.version.COMPILER_VERSION instead.
WARNING:tensorflow:From /home/jason/.local/share/JetBrains/Toolbox/apps/PyCharm-C/ch-0/193.5233.109/plugins/python-ce/helpers/pydev/_pydevd_bundle/pydevd_resolver.py:178: The name tf.CXX11_ABI_FLAG is deprecated. Please use tf.sysconfig.CXX11_ABI_FLAG instead.
WARNING:tensorflow:From /home/jason/.local/share/JetBrains/Toolbox/apps/PyCharm-C/ch-0/193.5233.109/plugins/python-ce/helpers/pydev/_pydevd_bundle/pydevd_resolver.py:178: The name tf.ConditionalAccumulator is deprecated. Please use tf.compat.v1.ConditionalAccumulator instead.
WARNING:tensorflow:
The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information, please see:
  * https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md
  * https://github.com/tensorflow/addons
  * https://github.com/tensorflow/io (for I/O related ops)
If you depend on functionality not listed there, please file an issue.

当我尝试通过以下方式检查Tensorflow的版本时:

tf.__version__

它输出:

'1.14.0'

我是Python的新手,我不确定是什么问题。

马拉特

python3 -m pip install --upgrade tensorflow-gpu>=2

我真的没有解释为什么它不能正常安装2.0。这些命令之间应该没有任何区别,但是这条命令起作用了,pip3 install没有起作用

另外,最好先更新pip本身:

pip3 install --upgrade pip

UPD,根本原因: TF2需要pip19。在大多数情况下,简单的pip升级应有所帮助。

此外,在最新版本中,pip3可执行文件已损坏,已通过使用进行了修复python3 -m pip这个问题已经解决。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

找不到Grammar.txt pip3 install --upgrade tensorflow-gpu

来自分类Dev

使用pip install的SSLError(安装TensorFlow)

来自分类Dev

Windows上的TensorFlow:“ pip install tensorflow”失败

来自分类Dev

pip install tensorflow 10rc.0失败-有关不存在的easy-install.pth文件的消息?

来自分类Dev

pip和easy_install>尝试安装tensorflow后出错

来自分类Dev

使用Python 3.7.0安装Tensorflow时出错-为什么pip3不能自行解决依赖关系?

来自分类Dev

pip3 install pyautogui失败,错误代码为1 Mac OS

来自分类Dev

安装旧版本的Tensorflow GPU

来自分类Dev

安装了较旧 GPU 版本的 Tensorflow

来自分类Dev

无法使用pip版本20安装tensorflow,找不到版本?

来自分类Dev

使用 pip for gpu 安装后找不到 tensorflow

来自分类Dev

pip3 指向错误版本的python

来自分类Dev

pip3和easy_install3损坏:DistributionNotFound

来自分类Dev

为什么 numpy 没有出现在我的 virtualenv 中的 pip3 列表中,即使我在两秒前执行 pip3 install numpy 安装了它?

来自分类Dev

Pip3安装模块在哪里?

来自分类Dev

使用virtualenv安装pip3

来自分类Dev

无法使用pip3安装DjangoRestFramework?

来自分类Dev

使用pip3安装JupyterLab

来自分类Dev

无法在ubantu中安装“ pip3”

来自分类Dev

从pip3安装软件包

来自分类Dev

如何使用pip3安装scipy?

来自分类Dev

用pip3安装软件

来自分类Dev

离线安装python 3.6.7 pip3

来自分类Dev

Python 3.6.2 pip3 安装失败

来自分类Dev

pip3 安装 virtualenv 失败

来自分类Dev

用conda安装了pytorch,将我的TF版本更改为1.13.0,现在conda install tensorflow-gpu = 2.0无法正常工作吗?

来自分类Dev

我无法通过pip安装Tensorflow版本1.15

来自分类Dev

pip3 install opencv正在查看错误的URL

来自分类Dev

安装 tensorflow 需要 GPU

Related 相关文章

  1. 1

    找不到Grammar.txt pip3 install --upgrade tensorflow-gpu

  2. 2

    使用pip install的SSLError(安装TensorFlow)

  3. 3

    Windows上的TensorFlow:“ pip install tensorflow”失败

  4. 4

    pip install tensorflow 10rc.0失败-有关不存在的easy-install.pth文件的消息?

  5. 5

    pip和easy_install>尝试安装tensorflow后出错

  6. 6

    使用Python 3.7.0安装Tensorflow时出错-为什么pip3不能自行解决依赖关系?

  7. 7

    pip3 install pyautogui失败,错误代码为1 Mac OS

  8. 8

    安装旧版本的Tensorflow GPU

  9. 9

    安装了较旧 GPU 版本的 Tensorflow

  10. 10

    无法使用pip版本20安装tensorflow,找不到版本?

  11. 11

    使用 pip for gpu 安装后找不到 tensorflow

  12. 12

    pip3 指向错误版本的python

  13. 13

    pip3和easy_install3损坏:DistributionNotFound

  14. 14

    为什么 numpy 没有出现在我的 virtualenv 中的 pip3 列表中,即使我在两秒前执行 pip3 install numpy 安装了它?

  15. 15

    Pip3安装模块在哪里?

  16. 16

    使用virtualenv安装pip3

  17. 17

    无法使用pip3安装DjangoRestFramework?

  18. 18

    使用pip3安装JupyterLab

  19. 19

    无法在ubantu中安装“ pip3”

  20. 20

    从pip3安装软件包

  21. 21

    如何使用pip3安装scipy?

  22. 22

    用pip3安装软件

  23. 23

    离线安装python 3.6.7 pip3

  24. 24

    Python 3.6.2 pip3 安装失败

  25. 25

    pip3 安装 virtualenv 失败

  26. 26

    用conda安装了pytorch,将我的TF版本更改为1.13.0,现在conda install tensorflow-gpu = 2.0无法正常工作吗?

  27. 27

    我无法通过pip安装Tensorflow版本1.15

  28. 28

    pip3 install opencv正在查看错误的URL

  29. 29

    安装 tensorflow 需要 GPU

热门标签

归档