【问题标题】:Error while installing tensorflow from pip从 pip 安装 tensorflow 时出错
【发布时间】:2020-09-22 12:37:11
【问题描述】:

我安装了 python,然后安装了 anaconda。当我尝试从 pip 命令安装 tensorflow 时,出现此错误。有人知道原因吗?

Microsoft Windows [Version 10.0.16299.98]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\Windows\system32>pip install tensorflow.
ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
ERROR: No matching distribution found for tensorflow.

C:\Windows\system32>

【问题讨论】:

  • 试试pip install tensorflow==1.14.0 或使用pip install tensorflow==2.0 之类的最新版本,然后告诉你得到了什么。即指定您要安装的版本。
  • 如果您使用的是 Conda,为什么要通过 pip 安装 tensorflow?

标签: python tensorflow pip anaconda conda


【解决方案1】:

TensorFlow 的安装说明位于here。 您会看到除了使用 pip 之外还有几个步骤。长话短说,一旦您在新环境中进行设置,请使用 pip install --upgrade tensorflow

话虽如此,您可能希望使用 Anaconda 而不是 pip 来安装它。 Anaconda 作为包管理器通常更好,只要有可能,您应该使用 Anaconda。

【讨论】: