59

I want to install Tensorflow 1.o for python on windows.

This is information for my system.

D:\>python --version
Python 3.5.2 :: Anaconda 4.2.0 (32-bit)

D:\>pip3 --version
pip 9.0.1 from d:\web\anaconda\lib\site-packages (python 3.5)'

But, when I execute below command,

D:\>pip3 install tensorflow
Collecting tensorflow
  Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow

I don't understand what the problem is...

And I tried another way...

This is case when I use Conda

(tensorflow) D:\>pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.0.0-cp35-cp35m-win_x86_64.whl
tensorflow-1.0.0-cp35-cp35m-win_x86_64.whl is not a supported wheel on this platform.

What is the problem?

1
  • tensorflow doesn't support python 32 bit it requires python 64 bit Aug 4, 2020 at 17:03

12 Answers 12

125

I was in same problem.

Below command solved my problem

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

to find the list of all the urls based on the python version and CPU or GPU only refer to: https://www.tensorflow.org/install/pip

5
  • 1
    what about gpu link? Apr 2, 2018 at 6:02
  • 2
    Answer should acknowledge the top answer from stackoverflow.com/questions/38896424/…
    – meduz
    Feb 4, 2019 at 11:40
  • when i install tensorflow using this command, i still cannot use keras in my code. Gives the error tensorflow cannot be found. What is the solution for that
    – Gethma
    Jan 12, 2020 at 9:58
  • @Gethma there are no links to many versions.. this should not be the solution.........
    – OneAndOnly
    Nov 30, 2020 at 11:38
  • @ceounii lee, Hey dude, accept this as an answer, it works. Dec 3, 2020 at 2:23
53

Tensorflow requires a 64-bit version of Python.

Additionally, it only supports Python 3.5.x through Python 3.8.x.

If you're using a 32-bit version of Python or a version that's too old or new, then you'll get that error message.

To fix it, you can install the 64-bit version of Python 3.8.6 via Python's website.

4
  • 7
    I have Python 3.6 64-Bit but still I am getting the same error on Windows 10 May 20, 2017 at 19:16
  • The other important missing piece of information for me was that the pip install... command needed to be run with Administrator privileges... otherwise it failed to install the six package.
    – omatai
    Jan 22, 2018 at 2:07
  • 2
    downgraded python 3.6 to 3.5 and it seems installing. Not throwing any error. Feb 14, 2018 at 18:54
  • I also had to ugrade pip to make it work with python 3.5
    – Romain
    Sep 14, 2018 at 20:21
19

Tensorflow on windows needs python 3.5. You can follow following steps to activate python 3.5 in anaconda:

  1. See which version of python you have: conda search python
  2. If you already have python 3.5 then go to step 3 otherwise use conda create -n py35 python=3.5 anaconda to create python 3.5
  3. Activate python 3.5 using activate py35
  4. Now install tensorflow using conda install tensorflow

If step4 is not working i.e, something like "tensorflow: no package found " then follow this tutorial to forge conda-forge channel and then try installing tensorflow using step4. It worked for me.

2
  • This is the first one that worked for me after trying several attempts.
    – Tensigh
    Jul 4, 2017 at 3:06
  • Based on this link we should use pip for installation, since conda package is community maintained. Sep 18, 2018 at 15:05
8

Try this

Installing with Anaconda

conda create --name tensorflow python=3.5
activate tensorflow
conda install jupyter
conda install scipy
pip install tensorflow
or
pip install tensorflow-gpu

It is important to add python=3.5 at the end of the first line, because it will install Python 3.5.

0
4

I was getting the same error

  1. Get Python 3.5
  2. Upgrade pip version to 9
  3. Install tensorflow

It worked for me

4

I did it with:

python3 -m pip install --upgrade tensorflow
3

From your python version output, looks like that you are using Anaconda python, in that case, there is a simple way to install tensorflow.

conda install -c conda-forge tensorflow

This command will take care of all dependencies like upgrade/downgrade etc.

0
1

upgrading pip worked for me

python -m pip install --upgrade pip
1

i had python 3.8.5 ..but it will not work with tenserflow..

so i installed python 3.7.9 and it worked.

0

The solution for me was sooo dumb!!

I was using Python 3.8 in my environment. I made a new environment using Python 3.7, and the install worked fine.

source

0

The TensorFlow package couldn't be found by the latest version of the "pip".
To be honest, I really don't know why this is...
but, the quick fix that worked out for me was:
[In case you are using a virtual environment]
downgrade the virtual environment to python-3.8.x and pip-20.2.x In case of anaconda, try:

conda install python=3.8

This should install the latest version of python-3.8 and pip-20.2.x for you.
And then, try

pip install tensorflow

Again, this worked fine for me, not sure if it'll work the same for you.

-1

The Reason is that TensorFlow is only available upto python versions <= 3.6. You can't download tensorflow for python versions > 3.6 as there is no tensorflow.

If you don't want to downgrade your entire python version for a single package, do this:

  1. create a new virtual environment for that project (using anaconda) conda create -n <env_name> python=3.6.8
  2. activate the created environment using conda activate <env_name>
  3. Now install pip install tensorflow

note: If tensorflow dosen't install : try install keras module first and then try installing tensorflow

3
  • My solution had worked exactly for me and my friends when we had ran through the same error, So I just posted a solution for the error which will solve and make program work fine. Alsp python <3.6 and >3.6 have no syntax changes, so there is no issues from migration of version. Mar 23, 2021 at 14:42
  • If my answer is inaccurate, then prove in any way thay my solution is not working for this error. Mar 23, 2021 at 14:42
  • The OP stated that the python version is Python 3.5.2 :: Anaconda 4.2.0 (32-bit) so your answer is not tackle it. Also from the Tensorflow document it stated that it does support Python version 3.6 and 3.7 on Windows. Mar 23, 2021 at 21:55

Not the answer you're looking for? Browse other questions tagged or ask your own question.