Installing TensorFlow on Windows (Python 3.6.x)

2019-01-10 11:39发布

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

20条回答
贼婆χ
2楼-- · 2019-01-10 11:56

Windows batch file for installing TensorFlow and Python 3.5 on Windows. The issue is that as of this date, TensorFlow is not updated to support Python 3.6+ and will not install. Additionally, many systems have an incompatible version of Python. This batch file should create a compatible environment without effecting other Python installs. See REM comments for assumptions.

REM download Anaconda3-4.2.0-Windows-x86_64.exe (contains python 3.5) from https://repo.continuum.io/archive/index.html
REM Assumes download is in %USERPROFILE%\Downloads
%USERPROFILE%\Downloads\Anaconda3-4.2.0-Windows-x86_64.exe

REM change path to use Anaconda3 (python 3.5).
PATH %USERPROFILE%\Anaconda3;%USERPROFILE%\Anaconda3\Scripts;%USERPROFILE%\Anaconda3\Library\bin;%PATH%

REM update pip to 9.0 or later (mandatory)
python -m pip install --upgrade pip

REM tell conda where to load tensorflow
conda config --add channels conda-forge

REM elevate command (mandatory) and install tensorflow - use explicit path to conda %USERPROFILE%\Anaconda3\scripts\conda
powershell.exe -Command start-process -verb runas cmd {/K "%USERPROFILE%\Anaconda3\scripts\conda install tensorflow"}

Be sure the above PATH is used when invoking TensorFlow.

查看更多
狗以群分
3楼-- · 2019-01-10 11:57

On 2/22/18, when I tried the official recommendation:

pip3 install --upgrade tensorflow

I got this error

Could not find a version that satisfies the requirement tensorflow

But instead using

pip install --upgrade tensorflow

installed it ok. (I ran it from the ps command prompt.)

I have 64-bit windows 10, 64-bit python 3.6.3, and pip3 version 9.0.1.

查看更多
再贱就再见
4楼-- · 2019-01-10 11:57

Tensor flow has only support for python 2.7 3.4 3.5 Other python versions are not supported So you please install the supported python version and try it again. The official link is https://www.tensorflow.org/install/install_linux#InstallingAnaconda It provides how to install it with anaconda . This will help you

查看更多
Deceive 欺骗
5楼-- · 2019-01-10 11:58

After searching a lot and trying to install and reinstall Python, i found the solution was very simple

use the following for windows

python -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.12.0-py3-none-any.whl

change to following on mac

python3 -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.12.0-py3-none-any.whl

for Anaconda use corresponding conda

查看更多
贼婆χ
6楼-- · 2019-01-10 12:00

Tensorflow indeed supports Python 3.6.X version, but only for 64-bit architecture. Here is the link where you can download Python 3.6.X 64-bit version

查看更多
孤傲高冷的网名
7楼-- · 2019-01-10 12:01

Same issue with you .

py3.6x win10 pro x64 pip 9.0.1

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

Maybe you can try py3.5

查看更多
登录 后发表回答