How to Fix Could not Find a Version that Satisfies the Requirement for Tensorflow

Tensorflow is an open-source platform for Artificial intelligence and it comprises of extensive libraries and community resources that lets researchers push the state-of-the-art in Machine Learning and engineers effectively manufacture and embed ML controlled applications on Microcontrollers and Microprocessors. The computer geeks are able to install Python and PyCharm easily on their systems but when they try to install Tensorflow they encounter the error message: “Could not find a version that satisfies the requirement TensorFlow (from versions: ) No matching distribution found for TensorFlow”. Many people have installed Flask to get rid of this issue but they aren’t able to hence, keeping this in view I’ve compiled some possible solutions to this problem and follow this guide throughout to get rid of this error.

TensorFlow Error

As it turns out, there are several different causes that might end up causing this issue hence let’s move a step ahead and test some fixes until we are able to eliminate this glitch on Windows.

Method 1: Verify Python Version On Your System

If you are running Windows 10, with Python 3.6.X version on your system then most probably Python-32 bit version would’ve been running on 64bit machine. Keep one thing in mind that TensorFlow is only compatible with 64bit installation of python and not 32bit version of python. If you’ve downloaded Python from python.org, the default installation would be 32 bit hence in order to get rid of this issue download a 64bit installer from here. Now, we need to set the PATH environment variable because it lists the directories that will be searched for executables when you type a command in the command prompt. By adding the path to the Python executable, you will be able to access python.exe by typing the python keyword (you won’t need to specify the full path to the program). If the PATH variable is not set the following error occurs:

C:\>python
'python' is not recognized as an internal or external command,
operable program or batch file.

As you can see that the command was not found hence to run python.exe, you need to specify the full path to the executable hence to specify the full path to the variable, follow the steps indexed below:

  1. Right-click on My Computer and afterward click on Properties button.
    Choose Properties
  2. On the left side of the window look for Advanced System Settings and after clicking on it you’ll observe that System Properties Window will be opened.
    System properties
  3. Now look for PATH variable option and click on Edit. Position your cursor at the end of the Variable value line and add the path to the python.exe file preceded with the semicolon character (;). In my case, I have added the following value: C:\Python36 because I want to run Python 3.6 version.
    Assign Variable Value
  4. Close all the Windows and search for Command Prompt. In the command window type the following command and hit enter. You’ll see that now the 64bit version is present on your system and now I’ll try to install TensorFlow and check whether the error is still there or not:
    C:\>python --version
    
    Python 3.7.6 (default, Jan 8 2020, 20:23:39) [MSC v.1916 64 bit (AMD64)]
  5. Run the following command to install TensorFlow on your system and hopefully now the installation will proceed without any error message. Note: TensorFlow is not yet in the PyPI repository, so you have to specify the URL to the appropriate “wheel file” for your operating system and Python version.
    pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.12.0-py3-none-any.whl
    Install Tensorflow

Method 2: Downgrade Your Python Version On Anaconda

Tensorflow only supports Python 3.6.x and only the 64bit version. Hence if you are running GUI like anaconda and python 3.7 is installed by default on it hence, we have to downgrade it to 3.6 to install the Tensorflow. For doing this task run the commands stated below on your Anaconda prompt:

conda install python=3.6.4

After running this command wait for a couple of seconds and then create a Virtual Environment for installing Tensorflow. Name the virtual environment such as “ab” and then install the current release of CPU-only TensorFlow:

conda create -n ab tensorflow
conda activate tf

After downgrading your python version the Tensorflow will now be installed without displaying any error and even if you’ve installed the Desktop version of Ubuntu it will work for that too.

Method 3: Update Package Installer For Python

Pip is the package installer for Python and we can use pip to install packages from the Python Package Index and other indexes. Although updates are released regularly after three months and these packages need to be updated manually on your system by running certain commands. If these are not outdated they might cause this Tensorflow installation error hence, we will update the pip package by running the following commands below so that all the packages are updated automatically:

pip install --upgrade pip

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

After updating the pip packages hopefully, your installation will run smoothly and you’ll be able to develop interesting programming projects using Tensorflow now.

Workaround: 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 that the options mentioned above like downgrading to the previous version of Python, Compiling TensorFlow from the source code and waiting for a matching version of TensorFlow to be released are all the possible remedies that could allow you to install Tensorflow on your system without any glitches.

ABOUT THE AUTHOR

Kevin Arrows


Kevin Arrows is a highly experienced and knowledgeable technology specialist with over a decade of industry experience. He holds a Microsoft Certified Technology Specialist (MCTS) certification and has a deep passion for staying up-to-date on the latest tech developments. Kevin has written extensively on a wide range of tech-related topics, showcasing his expertise and knowledge in areas such as software development, cybersecurity, and cloud computing. His contributions to the tech field have been widely recognized and respected by his peers, and he is highly regarded for his ability to explain complex technical concepts in a clear and concise manner.