Could not find a version that satisfies the requirement tensorflow
Asked Answered
A

26

392

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.

Abran answered 10/2, 2018 at 12:35 Comment(9)
what is your OS ?Backwoods
@Backwoods Windows 10Abran
@FlyingTeller the newest versionAbran
Try The process I have answered. I am assuming you already have Pip and Configured python in the ecosystemBackwoods
@Backwoods I am not just asking how to install a module. I need help solving this error I am getting.Abran
I am on Windows 10 with python 3.8.0 installed. Getting the same error message.Macrobiotic
If you are on Apple Silicon with M1 chip or higher you need to install Tensorflow differently than how is outlined on the site currently. Instructions here: https://mcmap.net/q/86710/-could-not-find-a-version-that-satisfies-the-requirement-tensorflowLarrisa
I am on windows 10, python 3.11.1 and am getting the same error message. I have a 64-bit system and am getting this same error.Dripdry
Python 3.11.0 and Windows-10 try to install in a virtual environment ....but it is showing same error.Alvira
I
267

The latest requirements for running TensorFlow are documented in the installation documentation.

  • TensorFlow only supports 64-bit Python

  • TensorFlow only supports certain versions of Python (for example, Python 3.6 is not supported)

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.

Inhale answered 13/8, 2018 at 23:44 Comment(13)
Could you please provide some references of where you have retrieved this information / date ?Turbellarian
on the official site, they still refer both 3.5.x and 3.6.x tensorflow.org/install/install_windowsNicky
v3.6.8 raises the same exceptionShrewd
Python v3.6.8 does not raise the exception for me; v3.7 didReclamation
@AER, I had this problem as well. I was running py3.6.8 32 bit... but tensorflow only works with 64 bitFetus
As of 2020-03-20 the same, but just for the next version: Python is at 3.8, but tensorflow does only supports 3.7Homan
Still true as of December 2020 -- downgrade to 3.8 and enjoyPasco
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.Diakinesis
Adding to @Diakinesis '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.0Factitive
As of 2021-02-28: https://mcmap.net/q/87900/-tensorflow-installation-in-python-3-9-0-64-bit-and-pip-version-20-2-3Schafer
What version should I istall?Confabulation
I have python 3.9 and tensorflow is working on it.Gleam
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.Selfmade
C
116

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

Concerted answered 5/5, 2019 at 2:29 Comment(4)
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/20690Deina
@Anil Sah what it will be for windows... I'm having the same problemDiscus
it installed successfully! yes, but, won't run correctly. why?Barcelona
this is the only option if youre using wsl2Marry
G
85

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.

  • Python versions later than 3.8 and Python 3.8 requires TensorFlow 2.2 or later. Check for supported Python versions.

For example, for TensorFlow 2.9, you can install Python3.8.6-64bit and it works like a charm. Check the latest information on the website.

Goral answered 7/11, 2018 at 6:53 Comment(4)
You can check your architecture using python -c "import sys; print(sys.version)" or python -c "import struct; print(struct.calcsize('P')*8)"Forsooth
I have Python 3.8.5, the 64-bit version, and I get the error when trying to install tensorflow>=1.15,<1.16.Pterodactyl
@Pterodactyl Python 3.8 requires TensorFlow 2.2 or laterGoral
@krenerd You should ask TensorFlow. They probably need to spend some time to make it compatible.Goral
F
47

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.

Fordo answered 26/11, 2018 at 20:19 Comment(1)
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.Muniments
H
38

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>
Holifield answered 22/3, 2018 at 15:42 Comment(5)
You have writen "python-2" twice, I guess the first one should be python 3.Abran
Worked for me, tooLogistics
doesn't work for me :( I just installed the latest Python 3.7 tooDefaulter
this fix worked for me with python3 on ubuntuFondle
it is the same to my case, it is necessary to upgrade pip firstDiamagnetic
S
18

Tensorflow 2.2.0 supports Python3.8

First, make sure to install Python 3.8 64bit. For some reason, the official site defaults to 32bit. Verify this using python -VV (two capital V, not W). Then continue as usual:

python -m pip install --upgrade pip
python -m pip install wheel  # not necessary
python -m pip install tensorflow

As usual, make sure you have CUDA 10.1 and CuDNN installed.

Seibold answered 29/4, 2020 at 9:57 Comment(10)
Are you sure this would install a release candidate (in this case 2.2.0rc3)?Ethbun
Yes, I am sure, I just did it. assert tensorflow.__version__ == '2.2.0-rc3' passes. Why the downvote?Seibold
I'm suprised. I get 2.1.0. Is there maybe a --pre in a pip configuration file somewhere?Ethbun
I've performed a clean installation - no special configurations, nothing. Uninstall everything, install Python3.8.2.Seibold
Does specifying the version explicitly work for you?Seibold
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.Ethbun
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.Seibold
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.Ethbun
Updated: no longer RCSeibold
This worked for me. I used python3.7 and tensorflow==2.0.3Sorghum
F
14

Tensorflow isn't available for python 3.8 (as of Dec 4th 2019) according to their documentation page. You will have to downgrade to python 3.7.

Ferritin answered 4/12, 2019 at 20:41 Comment(1)
It is available with python 3.8.2-64 bit version now (as of March 22 2020)Foothold
L
14

Apple Silicon (M1+ Chip)

If you are using a Mac with an M1 chip or higher, you need to install Tensorflow metal plugin for compatability with your architecture.

Simple installation instructions for Tensor Flow are found on Apple's website: https://developer.apple.com/metal/tensorflow-plugin

And since links tend to break in the future, here is an archive.

Larrisa answered 9/9, 2022 at 17:57 Comment(0)
G
13

I am using python 3.6.8, on ubunu 18.04, for me the solution was to just upgrade pip

pip install --upgrade pip
pip install tensorflow==2.1.0
Grooved answered 6/3, 2020 at 8:29 Comment(1)
upgrade pip did it for me! ThanksBuchenwald
A
10

Uninstalling Python and then reinstalling solved my issue and I was able to successfully install TensorFlow.

Abran answered 11/2, 2018 at 19:1 Comment(0)
B
9

So here's the message that I got on a M1 Pro while I was executing

python -m pip install tensorflow-macos

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

I then re-installed python from the official source:

https://www.python.org/downloads/macos/

(Yes, as stupid as it seems.)

I then followed the Apple tutorial for Monterey:

https://developer.apple.com/metal/tensorflow-plugin/

Everything was solved by then.

Banister answered 1/2, 2022 at 0:6 Comment(4)
Save my day, thumbs upBounds
You welcome, happy to know i helped someone today :)Banister
Thanks, I was able to run this without having to re-install python, by running the script in the instructions an env is created with python 3.9.13. I was originally using python 3.10 with home-brew and everything ran just fine.Develop
Happy to hear this! I needed both steps in my situation.Banister
D
8

Python version is not supported Uninstall python

https://www.python.org/downloads/release/python-362/

You should check and use the exact version in install page. https://www.tensorflow.org/install/install_windows

python 3.6.2 or python 3.5.2 solved this issue for me

Disk answered 14/4, 2018 at 11:47 Comment(0)
M
7

(as of Jan 1st, 2021)

Any over version 3.9.x there is no support for TensorFlow 2. If you are installing packages via pip with 3.9, you simply get a "package doesn't exist" message. After reverting to the latest 3.8.x. Thought I would drop this here, I will update when 3.9.x is working with Tensorflow 2.x

Marsala answered 2/1, 2021 at 9:47 Comment(0)
J
5

Looks like the problem is with Python 3.8. Use Python 3.7 instead. Steps I took to solve this.

  • Created a python 3.7 environment with conda
  • List item Installed rasa using pip install rasa within the environment.

Worked for me.

Justifier answered 21/1, 2020 at 7:52 Comment(1)
as of 2-2020, this may be the most likely answer. It was for me.Lau
A
5

I had this problem on my macOS (with M1 Pro) even with the latest 64-bit Python and the latest pip installed. This is how I've solved it. Try to run:

pip install tensorflow-macos

If you will get the error ending like this (like I did)...

...
raise ReadTimeoutError(self._pool, None, "Read timed out.")
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.

...then simply run:

pip install --default-timeout=100 tensorflow-macos
Application answered 15/1, 2023 at 20:9 Comment(0)
T
5

For python 3.12 tensorflow is not available yet

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

Please be informed that TensorFlow is just available till Python 3.11 as of 18th April 2024

https://www.tensorflow.org/install

enter image description here

Talus answered 15/11, 2023 at 2:21 Comment(0)
G
3

Running this before the tensorflow installation solved it for me:

pip install "pip>=19"

As the tensorflow's system requirements states:

pip 19.0 or later

Guitar answered 19/2, 2020 at 13:30 Comment(0)
D
3

For version TensorFlow 2.2:

  1. Make sure you have python 3.8

try: python --version

or python3 --version

or py --version

  1. Upgrade the pip of the python which has version 3.8

try: python3 -m pip install --upgrade pip

or python -m pip install --upgrade pip

or py -m pip install --upgrade pip

  1. Install TensorFlow:

try: python3 -m pip install TensorFlow

or python -m pip install TensorFlow

or py -m pip install TensorFlow

  1. Make sure to run the file with the correct python:

try: python3 file.py

or python file.py

or py file.py

Dowry answered 16/7, 2020 at 10:43 Comment(1)
This works. Try to find the combination that matches your systemNipa
S
2

1.Go to https://www.tensorflow.org/install/pip website and look if the version you are using support the Tensorflow. some latest version does not support Tesnsorflow. until Tensorflow releases its latest version for that Python version.

  1. you must have 64 bit python installed

  2. have latest version of pip installed
    pip install --upgrade pip

Supporting answered 8/11, 2020 at 12:33 Comment(0)
J
2

using pip install tensorflow --user did it for me

Joinery answered 9/9, 2021 at 0:47 Comment(0)
L
0

Tensorflow seems to need special versions of tools and libs. Pip only takes care of python version.

To handle this in a professional way (means it save tremendos time for me and others) you have to set a special environment for each software like this.

An advanced tool for this is conda.

I installed Tensorflow with this commands:

sudo apt install python3

sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1

sudo apt install python3-pip

sudo apt-get install curl

curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh > Miniconda3-latest-Linux-x86_64.sh

bash Miniconda3-latest-Linux-x86_64.sh

yes

source ~/.bashrc

  • installs its own phyton etc

nano .bashrc

  • maybe insert here your proxies etc.

conda create --name your_name python=3

conda activate your_name

conda install -c conda-forge tensorflow

  • check everything went well

python -c "import tensorflow as tf; tf.enable_eager_execution(); print(tf.reduce_sum(tf.random_normal([1000, 1000])))"

PS: some commands that may be helpful conda search tensorflow

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

uses virtualenv. Conda is more capable. Miniconda ist sufficient; the full conda is not necessary

Luckey answered 5/4, 2019 at 7:33 Comment(0)
O
0

use python version 3.6 or 3.7 but the important thing is you should install the python version of 64-bit.

Overplay answered 19/2, 2020 at 13:58 Comment(0)
V
0

In case you are using Docker, make sure you have

FROM python:x.y.z

instead of

FROM python:x.y.z-alpine.

Vein answered 11/10, 2020 at 14:56 Comment(0)
C
0

This issue also happens with other libraries such as matplotlib(which doesn't support Python > 3.9 for some functions) let's just use COLAB.

Cobbs answered 12/5, 2021 at 1:35 Comment(0)
A
0

Slightly different issue for me but I will still post an answer here. tensorflow package is working, but not tflite-runtime.

pip install --extra-index-url https://google-coral.github.io/py-repo/ tflite-runtime==2.5.0
Adrenaline answered 12/5, 2021 at 3:58 Comment(0)
J
-2

I solved the same problem with python 3.7 by installing one by one all the packages required

Here are the steps:

  1. Install the package
  2. See the error message:

    couldn't find a version that satisfies the requirement -- the name of the module required

  3. Install the module required. Very often, installation of the required module requires the installation of another module, and another module - a couple of the others and so on.

This way I installed more than 30 packages and it helped. Now I have tensorflow of the latest version in Python 3.7 and didn't have to downgrade the kernel.

Judi answered 6/4, 2020 at 10:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.