3

I am trying to install Tensorflow on Windows.

I have Anaconda 4.2.0. I tried running

conda create -n tensorflow python=3.5

in my command prompt. This seemed to do something, but I'm not sure what this accomplished. It created a folder within the Anaconda3 program in my username folder.

enter image description here

This folder is filled with the following content:

enter image description here

Over the summer, I used mainly Jupyter Notebooks to do my python coding. Within this environment, there is a tab marked Condas

enter image description here

So it looks like I should be able to switch to the Tensorflow environment. But this doesn't work when I try to switch, there is no option to change my kernel to a Tensorflow one. enter image description here

I tried running

conda search tensorflow

enter image description here

But nothing appears.

I'm not sure what to do. I asked a few grad students in my economics research group, but they weren't sure what to do either.

My Question

How do I properly install Tensorflow on Windows?

Community
  • 1
  • 1
Mr.NoName
  • 125
  • 4
  • 13
  • Possible duplicate: http://stackoverflow.com/questions/37522676/install-tensorflow-on-windows-with-anaconda – RJHunter Oct 15 '16 at 04:48

4 Answers4

2

The syntax of the command is conda create -n <name_of_new_env> <packages>. As a result, you created a clean environment named tensorflow with only Python 3.5 installed. Since conda search tensorflow returned nothing, you will have to use pip or some other method of installing the package. Since there is spotty official support for Windows, the conda-forge package (CPU only) at https://github.com/conda-forge/tensorflow-feedstock is probably the best way.

People have also reported success installing Tensorflow with docker, if you have docker set up already.

rlee827
  • 1,853
  • 2
  • 13
  • 32
  • But the readme file there tells me to run the same command that I started with. How is this different? – Mr.NoName Oct 15 '16 at 04:52
  • That command simply creates a new virtual environment to avoid polluting the default environment with `tensorflow` and its dependencies. As the documentation states: "Create a conda environment called tensorflow...activate the environment and use conda or pip to install TensorFlow inside it." – rlee827 Oct 15 '16 at 04:55
1

I was able to run it under the Windows 10 linux subsystem (https://msdn.microsoft.com/en-us/commandline/wsl/install_guide)

Which is basically a linux environment within windows.

The latest tensorflow version (0.12) added windows support https://www.tensorflow.org/get_started/os_setup#pip_installation_on_windows

just run:

pip install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-0.12.1-cp35-cp35m-win_amd64.whl

(the url is for the specific version - you will need to change it for future versions or other setups)

Ophir Yoktan
  • 8,149
  • 7
  • 58
  • 106
0

An Anaconda environment isolates itself completely with the outer world, so all the packages you installed outside the virtualenv is nothing in the virtualenv, if you want to use Tensorflow in the environment(seems like the only way with Anaconda), use activate tensorflow command and install the packages you want seperately.

Cro
  • 338
  • 4
  • 18
0

pip provides an easy method to install tensorflow on windows machine.

use the following pip command

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

Tensorflow only support python3.5 x64 bit on windows machines and it requires that you install Visual C++ 2015 redistributable (x64 version) to be able to import tensorflow

Jibin Mathew
  • 4,816
  • 4
  • 40
  • 68