【问题标题】:Install tensorflow-gpu on windows 10在 windows 10 上安装 tensorflow-gpu
【发布时间】:2018-09-11 06:53:26
【问题描述】:

我找到了有关 python3 的所有信息,但找不到有关 python2 的任何信息。

> pip install --upgrade tensorflow-gpu
    Collecting tensorflow-gpu
    Could not find a version that satisfies the requirement tensorflow-gpu (from versions: )
    No matching distribution found for tensorflow-gpu

我跟着https://www.tensorflow.org/install/install_windows#CommonInstallationProblemshttp://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/ 安装了CUDA,我得到了:

> nvcc -V
    nvcc: NVIDIA (R) Cuda compiler driver
    Copyright (c) 2005-2017 NVIDIA Corporation
    Built on Fri_Nov__3_21:08:12_Central_Daylight_Time_2017
    Cuda compilation tools, release 9.1, V9.1.85

所以我认为我在这方面做得很好。 我只需要pip 命令来安装tensorflow-gpu

我找到了一个指向 tensorflow-gpu 版本的链接,它应该可以工作,复制了链接并尝试了,但我明白了:

> pip install --upgrade https://pypi.python.org/packages/23/ad/63ae65999fd42a3e8d0044245e52513b31764167797651bef3ceb5202001/tensorflow_gpu-1.7.0-cp36-cp36m-win_amd64.whl#md5=7d780aa2c9f73c1ea9d3b87422aca096
    tensorflow_gpu-1.7.0-cp36-cp36m-win_amd64.whl is not a supported wheel on this platform.

编辑:

于是我卸载了python2并重新安装了python3,但还是不行:

> pip --version
    pip 9.0.3 from c:\program files (x86)\python36-32\lib\site-packages (python 3.6)
> pip install --upgrade tensorflow-gpu
    Collecting tensorflow-gpu
    Could not find a version that satisfies the requirement tensorflow-gpu (from versions: )
    No matching distribution found for tensorflow-gpu

编辑:

我写了一篇关于它的文章:https://leobenkel.com/2018/04/tensorflow-gpu-windows10-tutorial/

【问题讨论】:

标签: python windows tensorflow


【解决方案1】:

目前,Tensorflow 仅在 Python 3.5 和 3.6 版的64 位安装上受支持

如果您的计算机上未安装以下任一版本的 Python 机器,现在就安装吧:

Python 3.5.x 64-bit from python.org
Python 3.6.x 64-bit from python.org

查看 TensorFlow 网站了解更多信息details

【讨论】:

  • 我对使用 python2 有限制。不可能吗?
  • 它没有发布。也许没有比现在使用 64 位 Python 的解决方法了。
  • 好的,那我试试用python3,但是不太方便。感谢您的帮助
  • 我删除了python2并安装了python3,但它仍然无法正常工作。我更新了我的问题。
  • @Wonay 您已经安装了 32 位的 python .tensorflow 仅适用于 64 位。安装 64 位 python
【解决方案2】:

当我尝试安装基于 gpu 的 tensorflow 时,发现了同样的问题,那就是版本不满足。我在搜索后发现的问题的解决方案是,如果您当前安装了最新版本的 python,假设一开始我已经安装了 python3.7.x,当我尝试安装 gpu 版本的 tensorflow 时,问题就出现了。原因是新版本的 python tensorflow-gpu 还没有发布。所以,你必须安装更高版本,比如 python3.6 版本类型才能使其工作。 祝你好运!!

【讨论】:

    猜你喜欢
    • 2021-08-29
    • 2018-04-10
    • 1970-01-01
    • 2017-09-29
    • 1970-01-01
    • 2017-10-10
    • 1970-01-01
    • 2020-05-18
    • 2020-12-20
    相关资源
    最近更新 更多