TensorFlow not found using pip

后端 未结 30 2493
有刺的猬
有刺的猬 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:34

    I had the same problem. After uninstalling the 32-bit version of python and reinstalling the 64-bit version I tried reinstalling TensorFlow and it worked.

    Link to TensorFlow guide: https://www.tensorflow.org/install/install_windows

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

    If you are using the Anaconda Python installation, pip install tensorflow will give the error stated above, shown below:

    Collecting tensorflow
    Could not find a version that satisfies the requirement tensorflow (from versions: )
    No matching distribution found for tensorflow
    

    According to the TensorFlow installation page, you will need to use the --ignore-installed flag when running pip install.

    However, before this can be done see this link to ensure the TF_BINARY_URL variable is set correctly in relation to the desired version of TensorFlow that you wish to install.

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

    There are multiple groups of answers to this question. This answer aims to generalize one group of answers:

    There may not be a version of TensorFlow that is compatible with your version of Python. This is particularly true if you're using a new release of Python. For example, there may be a delay between the release of a new version of Python and the release of TensorFlow for that version of Python.

    In this case, I believe your options are to: 1) Downgrade to the previous version of Python. 2) Compile TensorFlow from the source code. 3) Wait for a matching version of TensorFlow.

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

    If you run into this issue recently (say, after Python 3.7 release in 2018), most likely this is caused by the lack of Python 3.7 support (yet) from the tensorflow side. Try using Python 3.6 instead if you don't mind. There are some tricks you can find from https://github.com/tensorflow/tensorflow/issues/20444, but use them at your own risk. I used the one harpone suggested - first downloaded the tensorflow wheel for Python 3.6 and then renamed it manually...

    cp tensorflow-1.11.0-cp36-cp36m-linux_x86_64.whl tensorflow-1.11.0-cp37-cp37m-linux_x86_64.whl
    pip install tensorflow-1.11.0-cp37-cp37m-linux_x86_64.whl
    

    The good news is that there is a pull request for 3.7 support already. Hope it will be released soon.

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

    Following these steps allows you to install tensorflow and keras:

    1. Download Anaconda3-5.2.0 which comes with python 3.6 from https://repo.anaconda.com/archive/

    2. Install Anaconda and open Anaconda Prompt and execute below commands

      conda install jupyter 
      conda install scipy
      pip install sklearn
      pip install msgpack
      pip install pandas
      pip install pandas-datareader
      pip install matplotlib 
      pip install pillow
      pip install requests
      pip install h5py
      pip install tensorflow
      pip install keras
      
    0 讨论(0)
  • 2020-11-22 08:37
    1. Start Command Prompt with Administrative Permission
    2. Enter following command python -m pip install --upgrade pip
    3. Next Enter command pip install tensorflow
    0 讨论(0)
提交回复
热议问题