2
votes

I have followed the instructions in

https://www.tensorflow.org/versions/r0.10/get_started/os_setup.html#anaconda-installation

activate tensorflow changes the environment as in the instructions

but

conda install -c conda-forge tensorflow

gives me Using Anaconda Cloud api site https://api.anaconda.org Fetching package metadata ......... Solving package specifications: . Error: Package missing in current win-32 channels: - tensorflow

Is there no way to install tensorflow in Windows?

2

2 Answers

2
votes

We just announced support for TensorFlow on Windows with the 0.12 release candidate. However, due to the vagaries of compiler versions on Windows, we only support Python 3.5 (see below for a fuller explanation).

At present there is no conda package for TensorFlow on Windows, but there is a pre-built PIP package in PyPI. If you install the 64-bit version of Python 3.5, either from Python.org or Anaconda, you can install TensorFlow with the following command (for the CPU-only version):

C:\> pip install tensorflow

If you have a GPU that supports CUDA 8.0, you can use the following command to install the GPU-accelerated version:

C:\> pip install tensorflow-gpu

Why does TensorFlow only support Python 3.5 on Windows? Python on Windows requires that you compile extensions using the same compiler as the one that was used to build the Python interpreter. The official distributions of Python 2.7 from Python.org and Anaconda were built with MSVC 9.0. We can't build TensorFlow with MSVC 9.0 (2008), because it relies on too many features from C++11, so we need to use MSVC 14.0 (2015). Only Python 3.5 on Windows was compiled with MSVC 14.0, so we are limited to supporting that version only.

0
votes

Create a conda environment named tensorflow by invoking the following command: C:>conda create -n tensorflow

Activate the conda environment by issuing the following command: C:> activate tensorflow (tensorflow)C:> # Your prompt should change

Issue the appropriate command to install TensorFlow inside your conda environment. To install the CPU-only version of TensorFlow, enter the following command:

( To get 32- and 64-bit Windows binaries of many scientific open-source extension packages for the official CPython distribution of the Python programming language..... copy link https://www.lfd.uci.edu/~gohlke/pythonlibs/)

(tensorflow)C:> pip install — ignore-installed — upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.0.1-cp35-cp35m-win_amd64.whl

1) To install the GPU version of TensorFlow, enter the following command (on a single line):

(tensorflow)C:> pip install — ignore-installed — upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-1.0.1-cp35-cp35m-win_amd64.whl

If you are using anaconda distribution and getting the above error, you can do the following to use python 3.5 on the new environnement “tensorflow”:

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