Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing TensorFlow on Windows (Python 3.6.x)

I'm trying to install TensorFlow on Windows.

I tried to install it with pip, but I always get the same error message:

... is not a supported wheel on this platform. 

I first tried it with Python 3.5.1, now I upgraded to 3.6.0b4, but it makes no difference.


Python:

Python 3.6.0b4 (default, Nov 22 2016, 05:30:12) [MSC v.1900 64 bit (AMD64)] on win32 

pip:

pip 9.0.1 from ...\python\lib\site-packages (python 3.6) 

To be exact, I tried the following two commands:

pip install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-0.12.0rc0-cp35-cp35m-win_amd64.whl pip install --upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-0.12.0rc0-cp35-cp35m-win_amd64.whl 

they output the following:

> tensorflow-0.12.0rc0-cp35-cp35m-win_amd64.whl is not a supported wheel on this platform. > tensorflow_gpu-0.12.0rc0-cp35-cp35m-win_amd64.whl is not a supported wheel on this platform. 

Does anyone know how to solve this problem? I'm not sure where I'm making a mistake.

Thanks!


Edit 1

Btw, I also tried pip install tensorflow and pip install tensorflow-gpu like suggested here. I got the following output:

> Could not find a version that satisfies the requirement tensorflow (from versions: ) No matching distribution found for tensorflow > Could not find a version that satisfies the requirement tensorflow-gpu (from versions: ) No matching distribution found for tensorflow-gpu 
like image 704
Tobias Würth Avatar asked Nov 30 '16 09:11

Tobias Würth


People also ask

Does Python 3.7 support TensorFlow?

TensorFlow is tested and supported on the following 64-bit systems: Python 3.7–3.10.

How do I import a TensorFlow in Python 3?

If you want to do it through Anaconda rather than pip ( pip3 install --upgrade tensorflow ): Create a conda environment called tensorflow : C:> conda create -n tensorflow python=3.5. Activate the environment: C:> activate tensorflow.

Does Python 3.8 support TensorFlow?

Tensorflow does not support Python 3.8 at the moment. The latest supported Python version is 3.7. A solution is to install Python 3.7, this will not affect your codes since Python 3.7 and 3.8 are very similar.


1 Answers

Update 15.11.2017

It seems that by now it is working like one would expect. Running the following commands using the following pip and python version should work.


Installing with Python 3.6.x


Version

Python: 3.6.3
pip: 9.0.1


Installation Commands

The following commands are based of the following installation guide here.

using cmd

C:> pip3 install --upgrade tensorflow // cpu C:> pip3 install --upgrade tensorflow-gpu // gpu 

using Anaconda

C:> conda create -n tensorflow python=3.5  C:> activate tensorflow (tensorflow)C:> pip install --ignore-installed --upgrade tensorflow (tensorflow)C:> pip install --ignore-installed --upgrade tensorflow-gpu  

Additional Information

A list of common installation problems can be found here.

You can find an example console output of a successful tensorflow cpu installation here.


Old response:

Okay to conclude; use version 3.5.2 !
Neither 3.5.1 nor 3.6.x seem to work at the moment.

Versions:

Python 3.5.2 pip 8.1.1 .. (python 3.5)

Commands:

// cpu C:> pip install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-0.12.0rc0-cp35-cp35m-win_amd64.whl  // gpu C:> pip install --upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-0.12.0rc0-cp35-cp35m-win_amd64.whl 

like image 62
Tobias Würth Avatar answered Sep 20 '22 19:09

Tobias Würth