【问题标题】:TensorFlow on Windows: "pip install tensorflow" failsWindows 上的 TensorFlow:“pip install tensorflow”失败
【发布时间】:2017-04-21 21:41:55
【问题描述】:

我正在使用 Visual Studio 2015、Python 3.5.2、Windows 10,并且最近将 pip 升级到了 9.0.1。我正在尝试在我的系统上安装 Tensorflow 0.12。我尝试使用VS内置的“安装Python包”功能,以及命令提示符

pip install python

两种方式我都会得到同样的错误:

Installing 'tensorflow'
Collecting tensorflow
  Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow
'tensorflow' failed to install. Exit code: 1`

我不知道从这里做什么。据说 pip 命令是我所要做的一切,其他任何地方都没有任何故障排除。

Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2013, 22:01:18) [MSC v.1900 32 bit (Intel)] on win32

【问题讨论】:

  • 能否用运行 Python 时打印出的文本更新问题? (例如,Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)] on win32 是它在我的工作站上打印的内容。)
  • 完成了,就在上面。

标签: visual-studio-2015 pip tensorflow windows-10 python-3.5


【解决方案1】:

Pip 不附带 tensorflow 包。您需要添加它。您可以按照 tensorflow windows 安装说明进行操作。

https://www.tensorflow.org/versions/r0.12/get_started/os_setup.html#pip-installation-on-windows

对于 CPU。

pip install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-0.12.0rc0-cp35-cp35m-win_amd64.whl

对于 GPU。

pip install --upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-0.12.0rc0-cp35-cp35m-win_amd64.whl

【讨论】:

  • 我尝试将这些复制到我的命令提示符中,无论是我的默认命令提示符还是 ~\Python\Python35-32 中的命令提示符,它们都不起作用。错误是tensorflow-0.12.0rc0-cp35m-win_amd64.whl is not a supported wheel on this platform
【解决方案2】:

根据您的 Python 版本字符串,您正在运行 32 位版本的 Python 解释器。我们只为 Python 3.5 的 64 位 版本制作了 PIP 包,可以从 Python.org 或 Anaconda 单独下载和安装。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-12-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-10-17
    相关资源
    最近更新 更多