Could not find a version that satisfies the requirement tensorflow

654,938

Solution 1

As of October 2020:

  • Tensorflow only supports the 64-bit version of Python

  • Tensorflow only supports Python 3.5 to 3.8

So, if you're using an out-of-range version of Python (older or newer) or a 32-bit version, then you'll need to use a different version.

Solution 2

There are a few important rules to install Tensorflow:

  • You have to install Python x64. It doesn't work with x86/32b and it gives the same error as yours.

  • It doesn't support Python versions later than 3.8 and Python 3.8 requires TensorFlow 2.2 or later.

For example, you can install Python3.8.6-64bit and it works like a charm.

Solution 3

I installed it successfully by pip install https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.8.0-py3-none-any.whl

Solution 4

if you are using anaconda, python 3.7 is installed by default, so you have to downgrade it to 3.6:

conda install python=3.6

then:

pip install tensorflow

it worked for me in Ubuntu.

Solution 5

I am giving it for Windows

If you are using python-3

  1. Upgrade pip to the latest version using py -m pip install --upgrade pip
  2. Install package using py -m pip install <package-name>

If you are using python-2

  1. Upgrade pip to the latest version using py -2 -m pip install --upgrade pip
  2. Install package using py -2 -m pip install <package-name>

It worked for me

Share:
654,938

Related videos on Youtube

Martin W
Author by

Martin W

Updated on February 01, 2022

Comments

  • Martin W
    Martin W over 2 years

    I installed the latest version of Python (3.6.4 64-bit) and the latest version of PyCharm (2017.3.3 64-bit). Then I installed some modules in PyCharm (Numpy, Pandas, etc), but when I tried installing Tensorflow it didn't install, and I got the error message:

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

    Then I tried installing TensorFlow from the command prompt and I got the same error message. I did however successfully install tflearn.

    I also installed Python 2.7, but I got the same error message again. I googled the error and tried some of the things which were suggested to other people, but nothing worked (this included installing Flask).

    How can I install Tensorflow? Thanks.

    • TheTechGuy
      TheTechGuy about 6 years
      what is your OS ?
    • Martin W
      Martin W about 6 years
      @TheTechGuy Windows 10
    • Martin W
      Martin W about 6 years
      @FlyingTeller the newest version
    • TheTechGuy
      TheTechGuy about 6 years
      Try The process I have answered. I am assuming you already have Pip and Configured python in the ecosystem
    • Martin W
      Martin W about 6 years
      @TheTechGuy I am not just asking how to install a module. I need help solving this error I am getting.
    • TiredOfProgramming
      TiredOfProgramming over 4 years
      I am on Windows 10 with python 3.8.0 installed. Getting the same error message.
  • Martin W
    Martin W about 6 years
    You have writen "python-2" twice, I guess the first one should be python 3.
  • sundowatch
    sundowatch almost 6 years
    Worked for me, too
  • Marco D.G.
    Marco D.G. over 5 years
    Could you please provide some references of where you have retrieved this information / date ?
  • Jirka
    Jirka over 5 years
    on the official site, they still refer both 3.5.x and 3.6.x tensorflow.org/install/install_windows
  • Raksha
    Raksha over 5 years
    doesn't work for me :( I just installed the latest Python 3.7 too
  • Moradnejad
    Moradnejad over 5 years
    @Raksha see my answer. It'll help you.
  • Hashman
    Hashman over 5 years
    This was my problem. Needed to rollback the python version. Took half a day to figure out. The internet is full of guides that say nothing about this. And Conda can't give a meaningful error message? How many man hours are getting wasted globally on this python package crap.,FFS.
  • AER
    AER about 5 years
    v3.6.8 raises the same exception
  • Pro Q
    Pro Q over 4 years
    Python v3.6.8 does not raise the exception for me; v3.7 did
  • ColinMac
    ColinMac over 4 years
    @AER, I had this problem as well. I was running py3.6.8 32 bit... but tensorflow only works with 64 bit
  • nichole
    nichole over 4 years
    If you find conflict with use of tensorflow and python3, this page has advice on editing the reserved word 'async' in a file github.com/tensorflow/tensorflow/issues/20690
  • Atia Riaz
    Atia Riaz over 4 years
    @Anil Sah what it will be for windows... I'm having the same problem
  • kiLLua
    kiLLua over 4 years
    it installed successfully! yes, but, won't run correctly. why?
  • Slate
    Slate over 4 years
    You can check your architecture using python -c "import sys; print(sys.version)" or python -c "import struct; print(struct.calcsize('P')*8)"
  • Robert Lugg
    Robert Lugg about 4 years
    as of 2-2020, this may be the most likely answer. It was for me.
  • debuglevel
    debuglevel about 4 years
    As of 2020-03-20 the same, but just for the next version: Python is at 3.8, but tensorflow does only supports 3.7
  • Georgi Georgiev
    Georgi Georgiev about 4 years
    It is available with python 3.8.2-64 bit version now (as of March 22 2020)
  • sinoroc
    sinoroc about 4 years
    Are you sure this would install a release candidate (in this case 2.2.0rc3)?
  • Elazar
    Elazar about 4 years
    Yes, I am sure, I just did it. assert tensorflow.__version__ == '2.2.0-rc3' passes. Why the downvote?
  • sinoroc
    sinoroc about 4 years
    I'm suprised. I get 2.1.0. Is there maybe a --pre in a pip configuration file somewhere?
  • Elazar
    Elazar about 4 years
    I've performed a clean installation - no special configurations, nothing. Uninstall everything, install Python3.8.2.
  • Elazar
    Elazar about 4 years
    Does specifying the version explicitly work for you?
  • sinoroc
    sinoroc about 4 years
    I'm not trying to install tensorflow myself, I just want to point out (to other readers) that as far as I know pip does not install release candidates by default, unless the --pre option is used. I'm surprised that the release candidate is getting installed in your case, maybe check the output of path/to/pythonX.Y -m pip config list. But maybe I missed something entirely. If it works for you, then all is good.
  • Elazar
    Elazar about 4 years
    I see what you mean, but picking a release candidate when there's no stable version available for 3.8 seems logical. pip config list gives me nothing. I will suggest using --pre in the answer.
  • sinoroc
    sinoroc about 4 years
    Ah, that could explain it. If the only release compatible with the Python interpreter is a release candidate, then pip might want to pick it anyway (I was testing with a different Python version <3.8). Still surprising to me.
  • Elazar
    Elazar almost 4 years
    Updated: no longer RC
  • nbro
    nbro over 3 years
    I have Python 3.8.5, the 64-bit version, and I get the error when trying to install tensorflow>=1.15,<1.16.
  • Moradnejad
    Moradnejad over 3 years
    @nbro Python 3.8 requires TensorFlow 2.2 or later
  • LordDraagon
    LordDraagon over 3 years
    This works. Try to find the combination that matches your system
  • AdrienW
    AdrienW over 3 years
    Still true as of December 2020 -- downgrade to 3.8 and enjoy
  • lizziepika
    lizziepika over 3 years
    this installed for me in january 2020 <3
  • Pedro
    Pedro over 3 years
    Could you please add to your prominent answer that officially "TensorFlow 2 packages require a pip version >19.0", thus in many cases python -m pip install --upgrade pip is required (true both for Linux and Windows). For instance, after installing python3.8 on Ubuntu 18.04 LTS, my pip version was 9.0.1, which was the problem in my case.
  • Moradnejad
    Moradnejad over 3 years
    @krenerd You should ask TensorFlow. They probably need to spend some time to make it compatible.
  • Oren Yosifon
    Oren Yosifon over 3 years
    Adding to @Pedro 's comment: Even though the documentation says that pip >19.0 is required, on Windows, it worked for me only after upgrading to latest pip which is > 21.0
  • Lonely
    Lonely about 3 years
  • Admin
    Admin about 3 years
    What version should I istall?
  • Javad Shirkhani
    Javad Shirkhani almost 3 years
    It work correctly, I could install tensorflow.
  • GabrielVasile
    GabrielVasile over 2 years
    this fix worked for me with python3 on ubuntu
  • MohammadReza Hosseini
    MohammadReza Hosseini about 2 years
    I have python 3.9 and tensorflow is working on it.
  • Victor Lengler
    Victor Lengler about 2 years
    this is the only option if youre using wsl2
  • James Cutler
    James Cutler about 2 years
    I have python 3.8, 64bit, and I got this same error. So, I don't think this "solution" should be given the credit for actually solving the problem.
  • John Lee
    John Lee about 2 years
    Save my day, thumbs up
  • SHANNAX
    SHANNAX about 2 years
    You welcome, happy to know i helped someone today :)