Could not find a version that satisfies the requirement tensorflow
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
- Upgrade pip to the latest version using
py -m pip install --upgrade pip
- Install package using
py -m pip install <package-name>
If you are using python-2
- Upgrade pip to the latest version using
py -2 -m pip install --upgrade pip
- Install package using
py -2 -m pip install <package-name>
It worked for me
Related videos on Youtube
Martin W
Updated on February 01, 2022Comments
-
Martin W over 2 years
I installed the latest version of Python
(3.6.4 64-bit)
and the latest version ofPyCharm (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 about 6 yearswhat is your OS ?
-
Martin W about 6 years@TheTechGuy Windows 10
-
Martin W about 6 years@FlyingTeller the newest version
-
TheTechGuy about 6 yearsTry The process I have answered. I am assuming you already have Pip and Configured python in the ecosystem
-
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 over 4 yearsI am on Windows 10 with python 3.8.0 installed. Getting the same error message.
-
-
Martin W about 6 yearsYou have writen "python-2" twice, I guess the first one should be python 3.
-
sundowatch almost 6 yearsWorked for me, too
-
Marco D.G. over 5 yearsCould you please provide some references of where you have retrieved this information / date ?
-
Jirka over 5 yearson the official site, they still refer both 3.5.x and 3.6.x tensorflow.org/install/install_windows
-
Raksha over 5 yearsdoesn't work for me :( I just installed the latest Python 3.7 too
-
Moradnejad over 5 years@Raksha see my answer. It'll help you.
-
Hashman over 5 yearsThis 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 about 5 yearsv3.6.8 raises the same exception
-
Pro Q over 4 yearsPython v3.6.8 does not raise the exception for me; v3.7 did
-
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 over 4 yearsIf 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 over 4 years@Anil Sah what it will be for windows... I'm having the same problem
-
kiLLua over 4 yearsit installed successfully! yes, but, won't run correctly. why?
-
Slate over 4 yearsYou can check your architecture using
python -c "import sys; print(sys.version)"
orpython -c "import struct; print(struct.calcsize('P')*8)"
-
Robert Lugg about 4 yearsas of 2-2020, this may be the most likely answer. It was for me.
-
debuglevel about 4 yearsAs 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 about 4 yearsIt is available with python 3.8.2-64 bit version now (as of March 22 2020)
-
sinoroc about 4 yearsAre you sure this would install a release candidate (in this case
2.2.0rc3
)? -
Elazar about 4 yearsYes, I am sure, I just did it.
assert tensorflow.__version__ == '2.2.0-rc3'
passes. Why the downvote? -
sinoroc about 4 yearsI'm suprised. I get
2.1.0
. Is there maybe a--pre
in a pip configuration file somewhere? -
Elazar about 4 yearsI've performed a clean installation - no special configurations, nothing. Uninstall everything, install Python3.8.2.
-
Elazar about 4 yearsDoes specifying the version explicitly work for you?
-
sinoroc about 4 yearsI'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 ofpath/to/pythonX.Y -m pip config list
. But maybe I missed something entirely. If it works for you, then all is good. -
Elazar about 4 yearsI 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 about 4 yearsAh, 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 almost 4 yearsUpdated: no longer RC
-
nbro over 3 yearsI have Python 3.8.5, the 64-bit version, and I get the error when trying to install
tensorflow>=1.15,<1.16
. -
Moradnejad over 3 years@nbro Python 3.8 requires TensorFlow 2.2 or later
-
LordDraagon over 3 yearsThis works. Try to find the combination that matches your system
-
AdrienW over 3 yearsStill true as of December 2020 -- downgrade to 3.8 and enjoy
-
lizziepika over 3 yearsthis installed for me in january 2020 <3
-
Pedro over 3 yearsCould 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 over 3 years@krenerd You should ask TensorFlow. They probably need to spend some time to make it compatible.
-
Oren Yosifon over 3 yearsAdding 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 about 3 yearsAs of 2021-02-28: stackoverflow.com/a/66400534/3025289
-
Admin about 3 yearsWhat version should I istall?
-
Javad Shirkhani almost 3 yearsIt work correctly, I could install tensorflow.
-
GabrielVasile over 2 yearsthis fix worked for me with python3 on ubuntu
-
MohammadReza Hosseini about 2 yearsI have python 3.9 and tensorflow is working on it.
-
Victor Lengler about 2 yearsthis is the only option if youre using wsl2
-
James Cutler about 2 yearsI 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 about 2 yearsSave my day, thumbs up
-
SHANNAX about 2 yearsYou welcome, happy to know i helped someone today :)