tensorflow icon indicating copy to clipboard operation
tensorflow copied to clipboard

Windows support

Open aebk2015 opened this issue 11 years ago • 144 comments

I just learned about TensorFlow and I want to install on Windows 7, 64. I have both Python 2.7 and 3.5 on my PC.

Thanks,

aebk2015 avatar Nov 09 '15 21:11 aebk2015

Did you see the Download and Setup section on the TensorFlow website?

It should be a normal pip setup for Windows. Though of course there is always Docker for a super fast setup.

filR avatar Nov 09 '15 22:11 filR

You can run it inside docker (that is what worked for me). Here are the steps:

  1. Download and install docker toolbox for windows
  2. Run the folowing command to create a docker virtual machine:
    • docker-machine create vdocker -d virtualbox
  3. In a cmd window type the following:
    • FOR /f "tokens=*" %i IN ('docker-machine env --shell cmd vdocker') DO %i
    • docker run -it b.gcr.io/tensorflow/tensorflow

After a short while, you will get a linux shell. Type python and have fun :)

urish avatar Nov 09 '15 22:11 urish

I rather use PIP but when I try :

pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl

it gives me an error:

tensorflow-0.5.0-cp27-none-linux_x86_64.whl is not a supported wheel on this pla tform.

On Mon, Nov 9, 2015 at 2:24 PM, Phil Reither [email protected] wrote:

Did you see the Download and Setup http://www.tensorflow.org/get_started/os_setup.md section on the TensorFlow website?

It should be a normal pip setup for Windows https://stackoverflow.com/questions/4750806/how-to-install-pip-on-windows. Though of course there is always Docker for a super fast setup http://www.tensorflow.org/get_started/os_setup.md#docker-based_installation .

— Reply to this email directly or view it on GitHub https://github.com/tensorflow/tensorflow/issues/42#issuecomment-155218235 .

aebk2015 avatar Nov 09 '15 22:11 aebk2015

It gives me an error:

An error occurred trying to connect: Post http://localhost:2375/v1.21/containers /create: dial tcp 127.0.0.1:2375: ConnectEx tcp: No connection could be made bec ause the target machine actively refused it.

On Mon, Nov 9, 2015 at 2:24 PM, Uri Shaked [email protected] wrote:

You can run it inside docker (that is what worked for me). Here are the steps:

  1. Download and install docker toolbox for windows https://www.docker.com/docker-toolbox
  2. Open a cmd window, and type: docker run -it b.gcr.io/tensorflow/tensorflow
  3. After a short while, you will get a linux shell. Type python and have fun :)

— Reply to this email directly or view it on GitHub https://github.com/tensorflow/tensorflow/issues/42#issuecomment-155218273 .

aebk2015 avatar Nov 09 '15 22:11 aebk2015

@aebk2015 is that with the docker? I forgot another step, you also need to create a docker vm after installing the docker toolbox, the commands are:

  • docker-machine create vdocker -d virtualbox
  • FOR /f "tokens=*" %i IN ('docker-machine env --shell cmd vdocker') DO %i

urish avatar Nov 09 '15 22:11 urish

Uri, I tried installing docker toolbox following your previous commands but still it gives me the same error:

'docker-machine' is not recognized as an internal or external command, operable program or batch file.

On Mon, Nov 9, 2015 at 2:48 PM, Uri Shaked [email protected] wrote:

@aebk2015 https://github.com/aebk2015 is that with the docker? I forgot another step, you also need to create a docker vm after installing the docker toolbox, the commands are:

  • docker-machine create vdocker -d virtualbox
  • FOR /f "tokens=*" %i IN ('docker-machine env --shell cmd vdocker') DO %i

— Reply to this email directly or view it on GitHub https://github.com/tensorflow/tensorflow/issues/42#issuecomment-155223520 .

aebk2015 avatar Nov 10 '15 00:11 aebk2015

conda binary package would be nice (in addition to wheels) on windows, and build instructions with msvc or mingw compilers

den-run-ai avatar Nov 10 '15 04:11 den-run-ai

Merging this discussion with https://github.com/tensorflow/tensorflow/issues/17 to keep all the good info in one place.

vrv avatar Nov 10 '15 06:11 vrv

I installed docker and it fails with an error message when I try a quick start

jgharris7 avatar Nov 22 '15 17:11 jgharris7

@jgharris7 run as admin

Wizardofoddz avatar Nov 28 '15 00:11 Wizardofoddz

I put up some instructions / screenshots of running TensorFlow in a Docker Machine using the commands above if it's helpful for anyone. I was able to get it running on my Windows machine.

netinstructions avatar Dec 04 '15 20:12 netinstructions

where is the version tensorflow that supporting windows ? thank you

Robot-HaoL avatar Dec 12 '15 03:12 Robot-HaoL

TensorFlow needs a windows compatible version please!

arose13 avatar Dec 26 '15 04:12 arose13

Looking forward to a Win version or Conda package; getting Docker working's turning out to be a PIA; errors about bios settings, hosts already existing, vdocker not being running, Missing opening '(' after keyword 'for' etc.

David-OConnor avatar Dec 30 '15 20:12 David-OConnor

I followed all official docs on my win machine and managed to painfully install docker and then to download docker... uhm container(?) inside oracle VM VirtualBox

lrn2fly avatar Jan 04 '16 17:01 lrn2fly

@urish Thanks for your docker install! Total newb here :(

Ran the following command to create a docker virtual machine: docker-machine create vdocker -d virtualbox

In a cmd window typed the following:

FOR /f "tokens=*" %i IN ('docker-machine env --shell cmd vdocker') DO %i docker run -it b.gcr.io/tensorflow/tensorflow

The "vdocker" VM loaded and started, but never got the linux shell. Maybe didn't wait long enough or can it be launched from VM?

Also, any tips for setting up the files from https://github.com/anishathalye/neural-style Tensorflow/Python implementation so as to run on vdocker via Python commands or better yet ipython notebook commands? Thanks again for the docker install!

IAMJackal avatar Jan 19 '16 20:01 IAMJackal

I got far as getting to the python in cmd but for some weird reason if I try to do the same thing in powershell, I get a TLS connection error saying host is not running or the connection times out.

Is this due to error in my powershell configuration? I'm not too familiar with powershell but I prefer to work from there as opposed to the default cmd. Any ideas on how to circumvent this issue?

nogi-ogi avatar Jan 25 '16 04:01 nogi-ogi

Got TF to work in an elementary OS (ubuntu) virtual machine in Windows 10, gave up on running TF in docker.

IAMJackal avatar Jan 25 '16 05:01 IAMJackal

Does anyone know if it is possible to use Conda installations simultaneously with tensorflow running through Docker? I have packages I need to use that can only be installed through Conda. Thanks!

altaetran avatar Jan 28 '16 08:01 altaetran

For prototyping I would suggest stick to vritualbox solution. I installed tensorflow and theano in virtualbox ubuntu with windows host, and made some comparison with purely windows intallation of theano. I found little to no difference in speed between virtual box and pure winodws theano versions; Furthermore, I found that tensorflow in virtualbox is even slightly better (~25% faster) for cnns compared to windows theano in single threaded mode. Furthermore, both windows and vm theano has some threading problems (runs in 1 thread) which I did not figure out yet, but which makes tensorflow 2.5 times faster with cnns overall on my system compared to theano for cpu computations.

iaroslav-ai avatar Feb 19 '16 20:02 iaroslav-ai