TensorFlow not found using pip

后端 未结 30 2491
有刺的猬
有刺的猬 2020-11-22 08:06

I\'m trying to intstall TensorFlow using pip:

$ pip install tensorflow --user
Collecting tensorflow
Could not find          


        
相关标签:
30条回答
  • 2020-11-22 08:24

    I was facing the same issue. I tried the following and it worked. installing for Mac OS X, anaconda python 2.7

    pip uninstall tensorflow export TF_BINARY_URL=<get the correct url from http://tflearn.org/installation/> pip install --upgrade $TF_BINARY_URL

    Installed tensorflow-1.0.0

    0 讨论(0)
  • 2020-11-22 08:28

    You need a 64-bit version of Python and in your case are using a 32-bit version. As of now Tensorflow only supports 64-bit versions of Python 3.5.x and 3.8.x on Windows. See the install docs to see what is currently supported

    To check which version of Python you are running, type python or python3 to start the interpreter, and then type import struct;print(struct.calcsize("P") * 8) and that will print either 32 or 64 to tell you which bit version of Python you are running.

    From comments:

    To download a different version of Python for Windows, go to python.org/downloads/windows and scroll down until you see the version you want that ends in a "64". That will be the 64 bit version that should work with tensorflow

    0 讨论(0)
  • 2020-11-22 08:29

    Unfortunately my reputation is to low to command underneath @Sujoy answer.

    In their docs they claim to support python 3.6. The link provided by @mayur shows that their is indeed only a python3.5 wheel package. This is my try to install tensorflow:

    Microsoft Windows [Version 10.0.16299.371]
    (c) 2017 Microsoft Corporation. All rights reserved.
    
    C:\>python3 -m pip install --upgrade pip
    Requirement already up-to-date: pip in d:\python\v3\lib\site-packages (10.0.0)
    
    C:\>python3 -m pip -V
    pip 10.0.0 from D:\Python\V3\lib\site-packages\pip (python 3.6)
    
    C:\>python3 -m pip install --upgrade tensorflow
    Collecting tensorflow
    Could not find a version that satisfies the requirement tensorflow (from versions: )
    No matching distribution found for tensorflow
    

    while python 3.5 seems to install successfully. I would love to see a python3.6 version since they claim it should also work on python3.6.

    Quoted :

    "TensorFlow supports Python 3.5.x and 3.6.x on Windows. Note that Python 3 comes with the pip3 package manager, which is the program you'll use to install TensorFlow."

    Source : https://www.tensorflow.org/install/install_windows

    Python3.5 install :

    Microsoft Windows [Version 10.0.16299.371]
    (c) 2017 Microsoft Corporation. All rights reserved.
    
    C:\>python3 -m pip install --upgrade pip
    Requirement already up-to-date: pip in d:\python\v3\lib\site-packages (10.0.0)
    
    C:\>python3 -m pip -V
    pip 10.0.0 from D:\Python\V3_5\lib\site-packages\pip (python 3.5.2)
    
    C:\>python3 -m pip install --upgrade tensorflow
    Collecting tensorflow
      Downloading 
        ....
        ....
    

    I hope i am terrible wrong here but if not ring a alarm bell

    0 讨论(0)
  • 2020-11-22 08:30

    I found this to finally work.

    python3 -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.12.0-py3-none-any.whl
    

    Edit 1: This was tested on Windows (8, 8.1, 10), Mac and Linux. Change python3 to python according to your configuration. Change py3 to py2 in the url if you are using Python 2.x.

    Edit 2: A list of different versions if someone needs: https://storage.googleapis.com/tensorflow

    Edit 3: A list of urls for the available wheel packages is available here: https://www.tensorflow.org/install/pip#package-location

    0 讨论(0)
  • 2020-11-22 08:30

    From tensorflow website: "You will need pip version 8.1 or later for the following commands to work". Run this command to upgrade your pip, then try install tensorflow again:

    pip install --upgrade pip
    
    0 讨论(0)
  • 2020-11-22 08:30

    I installed tensorflow on conda but didnt seem to work on windows but finally this command here works fine on cmd.

     python.exe -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.12.0-py3-none-any.whl
    
    0 讨论(0)
提交回复
热议问题