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

32,208

Solution 1

On Windows, you must use Python 3.7.6 (64 bits) (or later version, provided it is 64-bits) to install tensorflow:

C:\Program Files\Python-3.7.6-x64> python.exe -m pip install --user tensorflow

Unfortunately, the 32-bit version is not supported by tensorflow and will give you that nasty error:

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

A few important notes:

  • Install Microsoft Visual C++ Redistributable packages for x64 (2015, 2017, 2019).
  • If you have previously installed Python 3.7 for x86, uninstall it from your system and also delete the directory where the x86 packages were stored to avoid a conflict with the new x64 packages that will be placed there. In my machine they were stored at C:\\Users\\karlphillip\\AppData\\Roaming\\Python\\Python37\\site-packages.
  • Finally, install Python 3.7.6 (x64) and upgrade pip with python -m pip install --user --upgrade pip.
  • Now, simply install tensorflow: python -m pip install --user tensorflow

Solution 2

Solution

I figured out that the issue is with the Python version.

  • ie : python 3.8.1 doesn't have the support for Tensorflow 3.8.1

So I downgraded Python version from 3.8.1 to 3.7.6 Later I worked fine

pip install https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.8.0-py3-none-any.whl

My System Specification

  • Windows 10
  • python 3.8.1
  • pip 19.3.1

Solution 3

For others who faced this problem, TensorFlow might not support the version you are running yet. At the time of writing, you will get the same error when running Python 3.9 and trying to install TensorFlow. You need to ensure your Python version is supported by TensorFlow.

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

TensorFlow is tested and supported on the following 64-bit systems:

  • Python 3.5–3.8

I then used a different python. i.e. python3.8 -m pip install tensorflow==2.3.0

Share:
32,208
Sevval Kahraman
Author by

Sevval Kahraman

Updated on December 03, 2021

Comments

  • Sevval Kahraman
    Sevval Kahraman over 2 years

    I want to install tensorflow to use Keras LSTM I installed Keras, and i import this lines to my code.

    from keras.callbacks import LambdaCallback
    from keras.models import Sequential
    from keras.layers import Dense, Activation
    from keras.layers import LSTM
    from keras.optimizers import RMSprop
    

    Error is when runnig the code:

    No module named 'tensorflow'
    

    Cmd error when i write "pip install tensorflow" :

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

    Pip version is 19.3 , python version 3.7