【问题标题】:pip::No matching distribution found for tensorflow-gpupip::没有找到 tensorflow-gpu 的匹配分布
【发布时间】:2017-10-08 09:28:01
【问题描述】:

我按照this tutorial 安装了适用于 Windows 10 的 Tensorflow。但是,我收到了这个错误。什么原因和解决方法?

C:\Users\mona6>conda create -n tensorflow-gpu python=3.6
Fetching package metadata ...........
Solving package specifications: .

Package plan for installation in environment C:\Users\mona6\AppData\Local\conda\conda\envs\tensorflow-gpu:

The following NEW packages will be INSTALLED:

    pip:            9.0.1-py36_1
    python:         3.6.1-0
    setuptools:     27.2.0-py36_1
    vs2015_runtime: 14.0.25123-0
    wheel:          0.29.0-py36_0

Proceed ([y]/n)? y

python-3.6.1-0 100% |###############################| Time: 0:00:01  17.89 MB/s
#
# To activate this environment, use:
# > activate tensorflow-gpu
#
# To deactivate this environment, use:
# > deactivate tensorflow-gpu
#
# * for power-users using bash, you must source
#


C:\Users\mona6>activate tensorflow-gpu

(tensorflow-gpu) C:\Users\mona6>pip install 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

【问题讨论】:

    标签: python python-3.x tensorflow pip anaconda


    【解决方案1】:

    这对我有用:

    (tensorflow-gpu) C:\Users\mona6>conda create -n py35 python=3.5
    Fetching package metadata ...........
    Solving package specifications: .
    
    Package plan for installation in environment C:\Users\mona6\AppData\Local\conda\conda\envs\py35:
    
    The following NEW packages will be INSTALLED:
    
        pip:            9.0.1-py35_1
        python:         3.5.3-0
        setuptools:     27.2.0-py35_1
        vs2015_runtime: 14.0.25123-0
        wheel:          0.29.0-py35_0
    
    Proceed ([y]/n)? y
    
    python-3.5.3-0 100% |###############################| Time: 0:00:01  22.65 MB/s
    setuptools-27. 100% |###############################| Time: 0:00:00  13.10 MB/s
    wheel-0.29.0-p 100% |###############################| Time: 0:00:00  16.25 MB/s
    pip-9.0.1-py35 100% |###############################| Time: 0:00:00  12.54 MB/s
    #
    # To activate this environment, use:
    # > activate py35
    #
    # To deactivate this environment, use:
    # > deactivate py35
    #
    # * for power-users using bash, you must source
    #
    
    
    (tensorflow-gpu) C:\Users\mona6>activate py35
    
    (py35) C:\Users\mona6>pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.1.0-cp35-cp35m-win_amd64.whl
    Collecting tensorflow==1.1.0 from https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.1.0-cp35-cp35m-win_amd64.whl
      Downloading https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.1.0-cp35-cp35m-win_amd64.whl (19.4MB)
        100% |################################| 19.4MB 90kB/s
    Collecting wheel>=0.26 (from tensorflow==1.1.0)
      Downloading wheel-0.29.0-py2.py3-none-any.whl (66kB)
        100% |################################| 71kB 2.9MB/s
    Collecting six>=1.10.0 (from tensorflow==1.1.0)
      Downloading six-1.10.0-py2.py3-none-any.whl
    Collecting werkzeug>=0.11.10 (from tensorflow==1.1.0)
      Downloading Werkzeug-0.12.1-py2.py3-none-any.whl (312kB)
        100% |################################| 317kB 3.5MB/s
    Collecting protobuf>=3.2.0 (from tensorflow==1.1.0)
      Downloading protobuf-3.3.0.tar.gz (271kB)
        100% |################################| 276kB 3.8MB/s
    Collecting numpy>=1.11.0 (from tensorflow==1.1.0)
      Downloading numpy-1.12.1-cp35-none-win_amd64.whl (7.7MB)
        100% |################################| 7.7MB 231kB/s
    Collecting setuptools (from protobuf>=3.2.0->tensorflow==1.1.0)
      Downloading setuptools-35.0.2-py2.py3-none-any.whl (390kB)
        100% |################################| 399kB 3.3MB/s
    Collecting appdirs>=1.4.0 (from setuptools->protobuf>=3.2.0->tensorflow==1.1.0)
      Downloading appdirs-1.4.3-py2.py3-none-any.whl
    Collecting packaging>=16.8 (from setuptools->protobuf>=3.2.0->tensorflow==1.1.0)
      Downloading packaging-16.8-py2.py3-none-any.whl
    Collecting pyparsing (from packaging>=16.8->setuptools->protobuf>=3.2.0->tensorflow==1.1.0)
      Downloading pyparsing-2.2.0-py2.py3-none-any.whl (56kB)
        100% |################################| 61kB 7.2MB/s
    Building wheels for collected packages: protobuf
      Running setup.py bdist_wheel for protobuf ... done
      Stored in directory: C:\Users\mona6\AppData\Local\pip\Cache\wheels\1b\42\a0\4c7343df5b629ec9c75655468dce7652b28026896b0209ba55
    Successfully built protobuf
    Installing collected packages: wheel, six, werkzeug, appdirs, pyparsing, packaging, setuptools, protobuf, numpy, tensorflow
    Successfully installed appdirs-1.4.3 numpy-1.12.1 packaging-16.8 protobuf-3.3.0 pyparsing-2.2.0 setuptools-35.0.2 six-1.10.0 tensorflow-1.1.0 werkzeug-0.12.1 wheel-0.29.0
    
    (py35) C:\Users\mona6>python
    Python 3.5.3 |Continuum Analytics, Inc.| (default, Feb 22 2017, 21:28:42) [MSC v.1900 64 bit (AMD64)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import tensorflow as tf
    

    【讨论】:

      【解决方案2】:

      如果你喜欢 Python3,python3.5 是唯一可以选择运行和安装 tensorflow 的版本。

      更多信息来自tensorflow官网:

      If the following version of Python is not installed on your machine, install it now:
      
      Python 3.5.x from python.org
      
      TensorFlow only supports version 3.5.x of Python on Windows. Note that Python 3.5.x comes with the pip3 package manager, which is the program you'll use to install TensorFlow.
      
      To install TensorFlow, start a terminal. Then issue the appropriate pip3 install command in that terminal. ...
      

      所以,我为你推荐Anaconda3-4.2.0,它支持Python3.5,并且可以在我的电脑上运行windows和ubuntu。

      这里是下载链接:https://repo.continuum.io/archive/

      您可以通过以下命令安装 TensorFlow-only CPU 版本:

      # pip install --upgrade tensorflow
      

      要安装 GPU 版本的 Tensorflow,请输入以下命令:

      # pip install --upgrade tensorflow-gpu
      

      它可以帮助你。

      【讨论】:

        【解决方案3】:

        试试这个,太简单优雅了(我觉得)

        将点子升级到20+

        pip install --upgrade pip
        

        然后安装使用(让系统决定哪个版本适合):

        pip install tensorflow-gpu
        

        【讨论】:

        • 对我不起作用 - 错误:找不到满足要求 tensorflow-gpu 的版本(来自版本:无)错误:未找到 tensorflow-gpu 的匹配分布
        • @jtlz2 你的操作系统是什么,python 版本是什么??
        猜你喜欢
        • 2020-12-09
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2017-05-05
        • 1970-01-01
        • 2020-10-21
        • 2020-07-15
        • 1970-01-01
        相关资源
        最近更新 更多