Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows support #42

Closed
aebk2015 opened this issue Nov 9, 2015 · 144 comments
Closed

Windows support #42

aebk2015 opened this issue Nov 9, 2015 · 144 comments

Comments

@aebk2015
Copy link

aebk2015 commented Nov 9, 2015

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,

@filR
Copy link

filR commented Nov 9, 2015

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.

@urish
Copy link

urish commented Nov 9, 2015

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 :)

@aebk2015
Copy link
Author

aebk2015 commented Nov 9, 2015

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 notifications@github.com
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
#42 (comment)
.

@aebk2015
Copy link
Author

aebk2015 commented Nov 9, 2015

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 notifications@github.com 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
#42 (comment)
.

@urish
Copy link

urish commented Nov 9, 2015

@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

@aebk2015
Copy link
Author

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 notifications@github.com 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
#42 (comment)
.

@den-run-ai
Copy link

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

@vrv
Copy link

vrv commented Nov 10, 2015

Merging this discussion with #17 to keep all the good info in one place.

@vrv vrv closed this as completed Nov 10, 2015
@jgharris7
Copy link

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

@Wizardofoddz
Copy link

@jgharris7 run as admin

@netinstructions
Copy link

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.

@Robot-HaoL
Copy link

where is the version tensorflow that supporting windows ? thank you

@arose13
Copy link

arose13 commented Dec 26, 2015

TensorFlow needs a windows compatible version please!

@David-OConnor
Copy link

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.

@lrn2fly
Copy link

lrn2fly commented Jan 4, 2016

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

@IAMJackal
Copy link

@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!

@nogi-ogi
Copy link

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?

@IAMJackal
Copy link

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

@altaetran
Copy link

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!

@iaroslav-ai
Copy link

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.

@IAMJackal
Copy link

@iaroslav-ai , thanks for the update!

@HWiese1980
Copy link

As long as you run it on the CPU that's correct. They should be pretty much equally fast. However, the major intention to get Tensorflow natively running on Windows is to be able to use the GPU. That's not possible from within a virtual machine. At least not when using Windows as the host.

@iaroslav-ai
Copy link

@SeveQ, yes, you are correct. For the case of host other than Windows, do you mean PCI paththrough? Would be really cool to have it on Windows. For those who would like to dig further into virtualbox direction, there is rCUDA, which does virtualization of GPUs, and is available for Windows. But then it might be easier as of now if GPU usage is absolutely necessary e.g. use ubuntu on usb drive.

@HWiese1980
Copy link

@iaroslav-ai Yepp, exactly. More precisely PCI-E passthrough which afaik isn't possible in Windows. And I agree, best way to go for the time being is to use Ubuntu. Be it on a USB stick or a second partition... However, as I mentioned in another issue here, dual booting is a pita. Especially if you're a hobbyist and want to do hobby-hopping between gaming and Tensowflowing every now and then. For this case - and I want to believe for others too - it'd be really awesome to have Tensorflow working natively and with GPU support on Windows.

@zkailinzhang
Copy link

C:\Users\Desktop>docker run -it b.gcr.io/tensorflow/tensorflow

Unable to find image 'b.gcr.io/tensorflow/tensorflow:latest' locally

docker: Error response from daemon: unable to ping registry endpoint https://b.g
cr.io/v0/
v2 ping attempt failed with error: Get https://b.gcr.io/v2/: dial tcp 64.233.188
.82:443: i/o timeout

ilblackdragon added a commit to ilblackdragon/tensorflow that referenced this issue Mar 9, 2016
…e class which will be called only fit() and use hidden_units at that time
ilblackdragon added a commit to ilblackdragon/tensorflow that referenced this issue Mar 9, 2016
@sarahharun
Copy link

The Linux shell to write python code or jupyter notebook in browser, nothing pops out. I tried to run the the jupyter manually on browser, didn't work. After the commands I'm attaching below, it doesn't do anything. I am using Windows 10.
capture

@mrry
Copy link
Contributor

mrry commented Nov 29, 2016

Today we announced native Windows support, with packages for Python 3.5. If you have installed the 64-bit version of Python 3.5 (either from Python.org or Anaconda), you can install TensorFlow with a single command:

C:\> pip install tensorflow

For GPU support, if you have CUDA 8.0 installed, you can install the following package instead:

C:\> pip install tensorflow-gpu

Please open a new issue if you have problems with these packages, and thanks for your interest in TensorFlow on Windows!

@offchan42
Copy link

offchan42 commented Nov 29, 2016

Finally! The time has come. So I don't have to use Docker without utilizing GPUs anymore.

@JerryKurata
Copy link

JerryKurata commented Nov 29, 2016

Thank you!!! great news.

@Techlucy
Copy link

Wooh,Great update.. and Last Saturday lost my windows partition files trying to install Ubuntu on Windows machine to use Tensorflow... Thanks to Testdisk software helped me to retrieve some... Now let us try this Tensorflow on windows......!!!!

@HWiese1980
Copy link

Holy mother of god! I didn't sleep very well last night but this is great news to untimely wake up to. Installing CUDA 8 right now (had to reinstall my Windows a couple of weeks ago and didn't bother yet to also install CUDA)!

@HWiese1980
Copy link

Oh, and just to inform you: with the corresponding wheels Keras now works with Tensorflow backend on Windows as well. I've just tried it: http://i.imgur.com/uO0Z1zz.png

You need the wheels of numpy-1.11.2+mkl+cp35 and scipy‑0.18.1‑cp35 for your system (32 or 64 bits) from there: http://www.lfd.uci.edu/~gohlke/pythonlibs/ and you need to configure your Keras appropriately to use Tensorflow as backend. That should do the job.

@Techlucy
Copy link

@HWiese1980 May I write you privately? Thanks!!!

@HWiese1980
Copy link

@Kamatio Sure!

@HWiese1980
Copy link

HWiese1980 commented Nov 30, 2016

I have to mention that some things regarding Keras still don't seem to work. I can run many of the examples shipping with the Keras git repo but some just respond with several different error messages...

But this repo here is about Tensorflow, so... just wanted to mention it.

@Techlucy
Copy link

Techlucy commented Dec 7, 2016

Can someone advise me how to run these function imports on recent released tensorflow on windows?
import audioTrainTest as aT
import audioBasicIO
import utilities

Have tried all ways to correct the errors but it failed. I am using Anaconda, Python 3.5 ....
Thanks!! @ry

@Pdash
Copy link

Pdash commented Dec 15, 2016

Hi,

I am trying to install Tensorflow in windows machine through Docker. I have also installed iPython. (See below image for details).
python version

If i am running the command "docker-machine ls", it is giving me below result in docker quick start terminal. I had already created a virtual machine "vdocker".
docker machine

When i am trying to run below code in cmd.exe, i am getting this.
"FOR /f "tokens=*" %i IN ('docker-machine env --shell cmd vdocker') DO %i
docker run -it b.gcr.io/tensorflow/tensorflow"

command prompt error

Also python window is not opening even if i am trying to open through browser.
http://192.168.99.101:8888/

Could you please tell me what is happening?

Thanks in advance !

@Techlucy
Copy link

But Tensorflow is now compatible with windows, May be no need to install it via Docker.. Just consult here and install on windows..

@JerryKurata
Copy link

JerryKurata commented Dec 15, 2016

I am not familiar with docker, but I agree with Kamatio that running natively is the best option, unless you need the Docker environment.

I run TensorFlow natively on my Windows 10 system with Juypter (was iPython) and it works great. The only glitch is that installing Tensorflow into a conda environment, instead of system-wide, is not yet supported.

@brando90
Copy link

it seems that this issue also happens with Docker images. For example, if you try to do

docker run -it --rm gcr.io/tensorflow/tensorflow

it freaks out with the notebook security warnings and doesn't open a bash shell.

@chitro
Copy link

chitro commented Dec 29, 2016

Hello I am running Tensorflow examples on my Win 10 machine with Python 3.5.2 and latest TF 0.12.0 (those out of the box) and seeing errors on several of them. Seeing several errors. For example, the wide-N-deep tutorial is throwing the following (along with lots of deprecation messages)

Traceback (most recent call last):
File "C:\projects\tf\tensorflow\tensorflow\examples\learn\wide_n_deep_tutorial.py", line 208, in
tf.app.run()
File "C:\Users\chitro\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\platform\app.py", line 43, in run
sys.exit(main(sys.argv[:1] + flags_passthrough))
File "C:\projects\tf\tensorflow\tensorflow\examples\learn\wide_n_deep_tutorial.py", line 204, in main
train_and_eval()
File "C:\projects\tf\tensorflow\tensorflow\examples\learn\wide_n_deep_tutorial.py", line 197, in train_and_eval
m.fit(input_fn=lambda: input_fn(df_train), steps=FLAGS.train_steps)
File "C:\Users\chitro\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\contrib\learn\python\learn\estimators\dnn_linear_combined.py", line 711, in fit
max_steps=max_steps)
File "C:\Users\chitro\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\util\deprecation.py", line 191, in new_func
return func(*args, **kwargs)
File "C:\Users\chitro\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\contrib\learn\python\learn\estimators\estimator.py", line 355, in fit
max_steps=max_steps)
File "C:\Users\chitro\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\contrib\learn\python\learn\estimators\estimator.py", line 690, in _train_model
features, labels = input_fn()
File "C:\projects\tf\tensorflow\tensorflow\examples\learn\wide_n_deep_tutorial.py", line 197, in
m.fit(input_fn=lambda: input_fn(df_train), steps=FLAGS.train_steps)
File "C:\projects\tf\tensorflow\tensorflow\examples\learn\wide_n_deep_tutorial.py", line 159, in input_fn
for k in CATEGORICAL_COLUMNS}
File "C:\projects\tf\tensorflow\tensorflow\examples\learn\wide_n_deep_tutorial.py", line 159, in
for k in CATEGORICAL_COLUMNS}
TypeError: init() got an unexpected keyword argument 'dense_shape'

Any idea where this could be from? I did a git pull for TF again to ensure I have latest examples.

@sunsided
Copy link

sunsided commented Jan 6, 2017

Sadly one nasty part is the integration with Google's Cloud Dataflow like in this example. You now have the choice of having TensorFlow (supporting only Python 3.5) or Apache Beam SDK (supporting only Python 2.7), but not both. 🙈

@mrry mrry changed the title How to install TensorFlow on Windows Windows support Jan 7, 2017
@dsblr
Copy link

dsblr commented Jan 21, 2017

This below link explain step by step with screenshot to install tensorflow on windows, docker not required.
http://start2deeplearning.blogspot.com

@raphaccgil
Copy link

Hello everybody....

I was trying to install tensorflow with pip commands and it was not supported...I am using windows system and python 2.7. The tflearn was possible to install. Do you have any suggestions?

@anujdutt9
Copy link

@raphaccgil Hi. Tensorflow is not yet supported on Python 2.7 on Windows System. Instead you can do the following:

  1. Install Python 3/3.5 [64-bit]
  2. Go to python installation folder using CMD
  3. cd to Scripts folder.
  4. Use command:
    pip3.5.exe install tensorflow

It will install perfectly.
Check your installation using:
import tensorflow as tf
in IDLE.
Hope this helps :)

benoitsteiner pushed a commit to benoitsteiner/tensorflow that referenced this issue Feb 16, 2017
benoitsteiner pushed a commit to benoitsteiner/tensorflow that referenced this issue Feb 17, 2017
vrv pushed a commit that referenced this issue Feb 21, 2017
* OpenCL improvements

Added Tile, Transpose and Range Ops double support for SYCL device.
Moved gpu_device_name() to test_util.py so now it can be used in force_gpu to pull either GPU or SYCL depending on what is available in the system.

* Improvements to the SYCL device support

 - Registration of Type Traits required for stride slice op
 - Registration of ConcatOffset, _ListToArray, _ArrayToList
   Pad, Reverse ( CPU ), ReverseV2 ( CPU ), Size, ExpandDims,
   Squeeze, StridedSlice, StridedSliceGrad, StridedSliceAssign,
   TileGrad, InvertPermutation, Transpose
 - Registration of Sycl kernels only for essential data types
 - Floor_div_real has been disabled for SYCL device
 - Device in control_flow_ops_py_test.py needed to be lower cased

* SYCL support improvements (#31)

* Improvements to the SYCL device support

This commit reduces number of failing tests when TensorFlow compiles
for OpenCL support.

 - Registration of Type Traits required for stride slice op
 - Registration of ConcatOffset, _ListToArray, _ArrayToList
   Pad, Reverse ( CPU ), ReverseV2 ( CPU ), Size, ExpandDims,
   Squeeze, StridedSlice, StridedSliceGrad, StridedSliceAssign,
   TileGrad, InvertPermutation, Transpose
 - Registration of Sycl kernels only for essential data types
 - Floor_div_real has been disabled for SYCL device
 - Device in control_flow_ops_py_test.py needed to be lower cased

* Fixes & Version bump (#33)

* Fix Unbuntu typo. (#38)

unbuntu -> ubuntu

* Add problem descriptions and solutions (#35)

* Add ComputeCpp lib folder to LD_LIBRARY_PATH

* Add ImportError problem + solution

If you get the error message "ImportError: libComputeCpp.so: cannot open shared
object file: No such file or directory", make sure you have added the
path to ComputeCpp's lib folder to your `LD_LIBRARY_PATH`.

* Add another ImportError problem + solution

If you get the error message "ImportError: cannot import name
'pywrap_tensorflow'" you may be standing in the TensorFlow directory.

* Improvements to the SYCL device support

* Registers FloorDiv, FloorMod and SoftMax Ops for SYCL device

* Workaround for 0 bytes allocation for SYCL device (#42)

* Sycl improvements (#44)

- Eigen version bump
 - Extends Cast and Cwise ops benchmark to cover Sycl device
 - Extends device_lib_test.py to cover Sycl device
 - Registers int32, string and ResourceHandler to run on host for
   Enter and RefEnter Sycl Ops
 - Enables RecudeMax op for Sycl since Eigen implementation is ready
 - Registers Less op for Sycl device

* Improved the formatting of the SYCL code

* Fixed compilation error.

* Made sure that using test sessions with force_gpu=True forces the
placement on a gpu device even if none is detected.
@NitinMahajan1
Copy link

image

Tried installing GPU and CPU versions.
Cannot install either and I am getting error as per screenshot above.

Info -
I have Anaconda 3 installed on my system
Python 3.6
Windows 10
i7 16 gigs ram
Intel HD Graphics 520

@anujdutt9
Copy link

anujdutt9 commented Feb 26, 2017

@NitinMahajan1 Hi. Try to install it as follows:

  1. Install Python 3/3.6 [64-bit]
  2. Go to python installation folder using CMD
  3. cd to Scripts folder.
  4. Use command:
    pip3.6.exe install tensorflow

It will install perfectly.
Check your installation using:
import tensorflow as tf
in IDLE.
Hope this helps :)

@ehfo0
Copy link

ehfo0 commented Mar 6, 2017

iget this error:
tensorflow_gpu-1.0.0-cp35-cp35m-win_x86_64.whl is not a supported wheel on this platform.
I have a geforce gtx 970 and windows 10 x64 home edition and anaconde python 3.6 is already installed!
what is the problem?

@sunsided
Copy link

sunsided commented Mar 6, 2017

@ehfo0 It requires Python 3.5

@Coderx7
Copy link

Coderx7 commented Mar 6, 2017

@ehfo0 : when you want to download the wheel package, pay attention to the cp3x section.
tensorflow_gpu-1.0.0-cp35-cp35m-win_x86_64.whl
cp35 means it needs python 3.5!

@mrry
Copy link
Contributor

mrry commented Mar 6, 2017

@sunsided and @Coderx7: Thanks for helping out @ehfo0!

This thread is getting a bit long, so I'm going to lock it for new conversation. If you have new questions about Windows support, please try Stack Overflow first, or open a new issue here if there appears to be a bug or you have a new feature request.

@tensorflow tensorflow locked and limited conversation to collaborators Mar 6, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests