Solve Error – Could not find a version that satisfies the requirement TensorFlow (from versions: ) No matching distribution found for TensorFlow

Solve Error – Could not find a version that satisfies the requirement TensorFlow (from versions: ) No matching distribution found for TensorFlow is an error which occurs in Python when you try to install Tensorflow without respecting the rules of Tensorflow installation.

In this article we are going to explain why the error is happening and how you can avoid it or solve it.

Explaining the Error – Could not find a version that satisfies the requirement TensorFlow (from versions: ) No matching distribution found for TensorFlow

This error is a Tensorflow installation error which happens when you do not pay attention to the installation rules and requirements specified in the TensorFlow Documentation.

Here is a link to the documentation: https://www.tensorflow.org/install/pip

First of all, this is how the message of the error could look like.

                                                                       #
Could not find a version that satisfies the requirement TensorFlow (from versions: ) No matching distribution found for TensorFlow.
                                                                       #

Bellow we will check out a few fixes and solutions that I have personally tested and verified, I hope the solutions bellow can solve your problem.

Solution 1 : install Tensorflow as a whl file

The first solution is to install Tensorflow as a whl file. To do that you can use the command bellow.

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

You can choose the version you want, a .whl is a type of built distribution.

This should solve your problem, if that is not the case then you should try the solutions bellow.

Solution 2 : Solve TensorFlow compatibility issues,

Another solution or should I say source of the problem is TensorFlow compatibility issues, you can go to this url: https://www.tensorflow.org/install/pip. And check out the Python versions supported.

For example as of now, you can not install Tensorflow with Python versions bellow Python 3.7

You can only install it with Python versions between 3.7 and 3.10.

Also, you should know that TensorFlow only supports 64-bit Python and wont work with the 32 bit versions of Python.

Solution 3 : Downgrade python version in Anaconda

This is a trick for Anaconda users. First do not read this without understanding the fixes above you need to understand the compatibility requirements between TensorFlow and Python.

Since by default Anaconda comes with python installed. You need to downgrade the version of python to a version bellow 3.7.

To do that, try the following command to install python 3.5 for example.

                                                                       #
conda install python=3.5
                                                                       #

Then, install TensorFlow using the command bellow.

                                                                       #
pip install tensorflow
                                                                       #

I hope this guide solved your problem, thank you for reading.

Summing-up

This is the end of the article, the error Could not find a version that satisfies the requirement TensorFlow (from versions: ) No matching distribution found for TensorFlow could be confusing but with a little bit of investigating the error could be solved.

Thanks for reading our post and good luck with the scripts to come. If you want to support us consider donating to our Kofi account using the red button on top of this page. Keep coding, keep learning Python and cheers. If you want to learn more about Python, please check out the Python Documentation : https://docs.python.org/3/