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 and Documentation #17

Closed
mohamedmansour opened this Issue Nov 9, 2015 · 180 comments

Comments

Projects
None yet
@mohamedmansour

mohamedmansour commented Nov 9, 2015

I was excited to see tensorflow, but as many other users, we are on Windows, would be nice to see this support happen. Will you accept Windows port contributions?

In the meantime, Microsoft recently released their Deep Learning toolkit which scales on multiple machines with GPUs for both Linux and Windows. https://github.com/Microsoft/CNTK

@janerivi

This comment has been minimized.

Show comment
Hide comment
@janerivi

janerivi Nov 9, 2015

I think its a great suggestion!

janerivi commented Nov 9, 2015

I think its a great suggestion!

@mysticuno

This comment has been minimized.

Show comment
Hide comment
@mysticuno

mysticuno Nov 9, 2015

Same, I was kind of disappointed to see no mention of Windows in the download and install page.

mysticuno commented Nov 9, 2015

Same, I was kind of disappointed to see no mention of Windows in the download and install page.

@ObviouslyGreen

This comment has been minimized.

Show comment
Hide comment
@ObviouslyGreen

ObviouslyGreen Nov 9, 2015

Anyone have an idea of what the major incompatibilities/accommodations are? Is it it mostly issues with file paths, etc?

It's built with Bazel, which only supports linux/mac, but the good news is that windows support for bazel seems will be out by the end of this year.

ObviouslyGreen commented Nov 9, 2015

Anyone have an idea of what the major incompatibilities/accommodations are? Is it it mostly issues with file paths, etc?

It's built with Bazel, which only supports linux/mac, but the good news is that windows support for bazel seems will be out by the end of this year.

@gordon-n-stevenson

This comment has been minimized.

Show comment
Hide comment

gordon-n-stevenson commented Nov 10, 2015

👍

@Andy-P

This comment has been minimized.

Show comment
Hide comment
@Andy-P

Andy-P Nov 10, 2015

You can already use TensorFlow on a Windows machine by using Docker.
Details are in this thread.
#42

Andy-P commented Nov 10, 2015

You can already use TensorFlow on a Windows machine by using Docker.
Details are in this thread.
#42

@AaronFriel

This comment has been minimized.

Show comment
Hide comment
@AaronFriel

AaronFriel Nov 10, 2015

I would like to use TensorFlow on Windows without Docker, in order to use GPU compute. Using Docker in this case is not using a Windows container, but a Linux virtual machine on Hyper-V or VirtualBox, and so the GPU will not be passed through.

AaronFriel commented Nov 10, 2015

I would like to use TensorFlow on Windows without Docker, in order to use GPU compute. Using Docker in this case is not using a Windows container, but a Linux virtual machine on Hyper-V or VirtualBox, and so the GPU will not be passed through.

@keon

This comment has been minimized.

Show comment
Hide comment
@keon

keon commented Nov 10, 2015

👍

This was referenced Nov 10, 2015

@darkAlert

This comment has been minimized.

Show comment
Hide comment
@darkAlert

darkAlert Nov 10, 2015

google, give us windows support , please!

darkAlert commented Nov 10, 2015

google, give us windows support , please!

@chai2010

This comment has been minimized.

Show comment
Hide comment
@chai2010

chai2010 commented Nov 10, 2015

+1/0.0

@surban

This comment has been minimized.

Show comment
Hide comment
@surban

surban commented Nov 10, 2015

+1

@bayerj

This comment has been minimized.

Show comment
Hide comment
@bayerj

bayerj Nov 10, 2015

Yeah, windows support would be super nice.

bayerj commented Nov 10, 2015

Yeah, windows support would be super nice.

@KennyVan

This comment has been minimized.

Show comment
Hide comment
@KennyVan

KennyVan Nov 10, 2015

+1
+1
+1

yes please

KennyVan commented Nov 10, 2015

+1
+1
+1

yes please

@deiruch

This comment has been minimized.

Show comment
Hide comment
@deiruch

deiruch Nov 10, 2015

Would love to use TensorFlow on Windows (native, not in a VM).

deiruch commented Nov 10, 2015

Would love to use TensorFlow on Windows (native, not in a VM).

@ahmadia

This comment has been minimized.

Show comment
Hide comment
@ahmadia

ahmadia Nov 10, 2015

I'll take a look into whether Continuum can provide a conda package for tensorflow.

ahmadia commented Nov 10, 2015

I'll take a look into whether Continuum can provide a conda package for tensorflow.

@sibleyd

This comment has been minimized.

Show comment
Hide comment
@sibleyd

sibleyd Nov 10, 2015

Judging by the use of bazel across the documentation, I assume its a matter of waiting for bazel to support windows. Is there anything specific to Tensorflow that would need to be addressed for windows to be supported, or is just bazel?

sibleyd commented Nov 10, 2015

Judging by the use of bazel across the documentation, I assume its a matter of waiting for bazel to support windows. Is there anything specific to Tensorflow that would need to be addressed for windows to be supported, or is just bazel?

@ahmadia

This comment has been minimized.

Show comment
Hide comment
@ahmadia

ahmadia Nov 10, 2015

One question I have is when Bazel support is actually arriving on Windows. Looking at the Bazel repository it says they are planning to support Android in Windows, but I didn't see any reference to building (what I assume are) native packages.

ahmadia commented Nov 10, 2015

One question I have is when Bazel support is actually arriving on Windows. Looking at the Bazel repository it says they are planning to support Android in Windows, but I didn't see any reference to building (what I assume are) native packages.

@davidzchen

This comment has been minimized.

Show comment
Hide comment
@davidzchen

davidzchen Nov 10, 2015

Member

Here is the bug we are using to track Bazel support for Windows: bazelbuild/bazel#276. A month ago, @dslomov was able to get Bazel to bootstrap itself on Windows. The plan is to finish Windows support by end of this year.

Member

davidzchen commented Nov 10, 2015

Here is the bug we are using to track Bazel support for Windows: bazelbuild/bazel#276. A month ago, @dslomov was able to get Bazel to bootstrap itself on Windows. The plan is to finish Windows support by end of this year.

@sibleyd

This comment has been minimized.

Show comment
Hide comment
@sibleyd

sibleyd Nov 11, 2015

@davidzchen I was actually working with that repo earlier this afternoon to try and give it a go without much luck, I might play around with it some more to see if I can get it to successfully bootstrap itself.

sibleyd commented Nov 11, 2015

@davidzchen I was actually working with that repo earlier this afternoon to try and give it a go without much luck, I might play around with it some more to see if I can get it to successfully bootstrap itself.

@datashinobi

This comment has been minimized.

Show comment
Hide comment
@datashinobi

datashinobi Nov 12, 2015

+1 native support on windows should be available

datashinobi commented Nov 12, 2015

+1 native support on windows should be available

@racaljk

This comment has been minimized.

Show comment
Hide comment
@racaljk

racaljk commented Nov 13, 2015

+1

@jakesays

This comment has been minimized.

Show comment
Hide comment
@jakesays

jakesays Nov 13, 2015

or maybe we could port it to a more reasonable build system. perhaps cmake.

jakesays commented Nov 13, 2015

or maybe we could port it to a more reasonable build system. perhaps cmake.

@aebk2015

This comment has been minimized.

Show comment
Hide comment
@aebk2015

aebk2015 Nov 13, 2015

@ahmadia do you have any tips on how to install tensorflow using conda?

aebk2015 commented Nov 13, 2015

@ahmadia do you have any tips on how to install tensorflow using conda?

@ahmadia

This comment has been minimized.

Show comment
Hide comment
@ahmadia

ahmadia Nov 13, 2015

Right now we're in the same boat as everybody else because there is no port of TensorFlow to Windows. If somebody can put together a Windows port I'm happy to help with the binary build/deployment. Somebody has already put together a recipe for OS X/Linux available with conda install -c memex tensorflow.

ahmadia commented Nov 13, 2015

Right now we're in the same boat as everybody else because there is no port of TensorFlow to Windows. If somebody can put together a Windows port I'm happy to help with the binary build/deployment. Somebody has already put together a recipe for OS X/Linux available with conda install -c memex tensorflow.

@nguyenquyhy

This comment has been minimized.

Show comment
Hide comment
@nguyenquyhy

nguyenquyhy commented Nov 20, 2015

+1 for this

@badescuga

This comment has been minimized.

Show comment
Hide comment
@badescuga

badescuga commented Dec 3, 2015

+1

@rajasrijan

This comment has been minimized.

Show comment
Hide comment
@rajasrijan

rajasrijan Dec 4, 2015

+1
also cmake support would be great

rajasrijan commented Dec 4, 2015

+1
also cmake support would be great

@netinstructions

This comment has been minimized.

Show comment
Hide comment
@netinstructions

netinstructions Dec 4, 2015

I put together an article with instructions and screenshots for getting TensorFlow to work on a Windows machine using Docker here using the tips from issue 42 if it's helpful for anyone.

Although I'm still not sure how I can take advantage of my GPU though if TensorFlow is running in a VM on my Windows machine.

netinstructions commented Dec 4, 2015

I put together an article with instructions and screenshots for getting TensorFlow to work on a Windows machine using Docker here using the tips from issue 42 if it's helpful for anyone.

Although I'm still not sure how I can take advantage of my GPU though if TensorFlow is running in a VM on my Windows machine.

@ramanindya55

This comment has been minimized.

Show comment
Hide comment
@ramanindya55

ramanindya55 Dec 9, 2015

+1 native windows support would be extremely helpful

ramanindya55 commented Dec 9, 2015

+1 native windows support would be extremely helpful

@FabHan

This comment has been minimized.

Show comment
Hide comment
@FabHan

FabHan commented Dec 12, 2015

+1

@Robot-HaoL

This comment has been minimized.

Show comment
Hide comment
@Robot-HaoL

Robot-HaoL Dec 12, 2015

I want have a version of TensorFlow for Windows 7,if you have,Please send my email.
My email address: 410524814@qq.com.
Thanks!

Robot-HaoL commented Dec 12, 2015

I want have a version of TensorFlow for Windows 7,if you have,Please send my email.
My email address: 410524814@qq.com.
Thanks!

@JesusPlz

This comment has been minimized.

Show comment
Hide comment
@JesusPlz

JesusPlz commented Dec 12, 2015

+1

@stonebig

This comment has been minimized.

Show comment
Hide comment
@stonebig

stonebig Dec 13, 2015

Windows support is a bit of a dramatic effort. Maybe supporting Windows only for a truly standard compiler (gcc / tdm-gcc / mingwpy) and on a modern Python (3.4?) would be a much more easy target ?

stonebig commented Dec 13, 2015

Windows support is a bit of a dramatic effort. Maybe supporting Windows only for a truly standard compiler (gcc / tdm-gcc / mingwpy) and on a modern Python (3.4?) would be a much more easy target ?

@4creators

This comment has been minimized.

Show comment
Hide comment
@4creators

4creators Dec 13, 2015

Perhaps using Clang frontend with VC++ CodeGen would be a fastest pathway to get working Windows builds -> Clang with Microsoft CodeGen in VS 2015 Update 1. Project was designed to provide consistently working toolchain for cross platform builds of code primarily targeting windows, nonetheless scenario in which *nix code is compiled on windows could be equally interesting. MSFT C++ team states that code they write is contributed back to LLVM project so it should allow for fast and joint work on getting good cross platform support.

4creators commented Dec 13, 2015

Perhaps using Clang frontend with VC++ CodeGen would be a fastest pathway to get working Windows builds -> Clang with Microsoft CodeGen in VS 2015 Update 1. Project was designed to provide consistently working toolchain for cross platform builds of code primarily targeting windows, nonetheless scenario in which *nix code is compiled on windows could be equally interesting. MSFT C++ team states that code they write is contributed back to LLVM project so it should allow for fast and joint work on getting good cross platform support.

@guschmue

This comment has been minimized.

Show comment
Hide comment
@guschmue

guschmue Oct 29, 2016

Contributor

I have the same cudnn version and its works fine for me. There are a bunch of conv python tests in the tf tree and they are all passing. I mostly use a 970 for testing. Your log was specific that it had issues initializing cudnn. Let me take a look at the init code.

Contributor

guschmue commented Oct 29, 2016

I have the same cudnn version and its works fine for me. There are a bunch of conv python tests in the tf tree and they are all passing. I mostly use a 970 for testing. Your log was specific that it had issues initializing cudnn. Let me take a look at the init code.

@synap5e

This comment has been minimized.

Show comment
Hide comment
@synap5e

synap5e Oct 29, 2016

OK the issue appears to be a driver one. I can successfully use cudnn and convolutions once each time I restart the video driver (using device manager disable then enable). Once I have used it in one process however, any future uses fail to initialise.

Furthermore I think other processes are having driver-related crashes once cudnn has been initialised.


Update: I've uninstalled and reinstalled my graphics driver and now I can have one process (jupyter kernel) with cudnn work correctly, but until I close that kernel every attempt to use cudnn in other kernels will encounter the same crash. If I restart the working kernel I can run the code in a different kernel without having to reload the driver.

synap5e commented Oct 29, 2016

OK the issue appears to be a driver one. I can successfully use cudnn and convolutions once each time I restart the video driver (using device manager disable then enable). Once I have used it in one process however, any future uses fail to initialise.

Furthermore I think other processes are having driver-related crashes once cudnn has been initialised.


Update: I've uninstalled and reinstalled my graphics driver and now I can have one process (jupyter kernel) with cudnn work correctly, but until I close that kernel every attempt to use cudnn in other kernels will encounter the same crash. If I restart the working kernel I can run the code in a different kernel without having to reload the driver.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Nov 2, 2016

It compiled for me, but I had to add shell=True in the line 150 of the file gen_git_source.py. Otherwise, I would get the same error as showed in:
http://stackoverflow.com/questions/24306205/file-not-found-error-when-launching-a-subprocess

ghost commented Nov 2, 2016

It compiled for me, but I had to add shell=True in the line 150 of the file gen_git_source.py. Otherwise, I would get the same error as showed in:
http://stackoverflow.com/questions/24306205/file-not-found-error-when-launching-a-subprocess

@guschmue

This comment has been minimized.

Show comment
Hide comment
@guschmue

guschmue Nov 2, 2016

Contributor

@synap5e if you run this in a normal tf.Session() a second instance will not work because tf manages all memory on the gpu. You can change the config for Session() like this:
config = tf.ConfigProto()
config.gpu_options.per_process_gpu_memory_fraction = 0.4
with tf.Session(config=config) as sess:
...
with that I can run 2 scripts in a loop that hit cudnn. This is the same on linux.
But it crashes is different on windows - on linux it gets CUDA_ERROR_OUT_OF_MEMORY, on windows it get CUDNN_STATUS_NOT_INITIALIZED. Going to take a look at this.

Contributor

guschmue commented Nov 2, 2016

@synap5e if you run this in a normal tf.Session() a second instance will not work because tf manages all memory on the gpu. You can change the config for Session() like this:
config = tf.ConfigProto()
config.gpu_options.per_process_gpu_memory_fraction = 0.4
with tf.Session(config=config) as sess:
...
with that I can run 2 scripts in a loop that hit cudnn. This is the same on linux.
But it crashes is different on windows - on linux it gets CUDA_ERROR_OUT_OF_MEMORY, on windows it get CUDNN_STATUS_NOT_INITIALIZED. Going to take a look at this.

@synap5e

This comment has been minimized.

Show comment
Hide comment
@synap5e

synap5e Nov 2, 2016

Ah so the problem was that my system was using too much video memory even before initialising tensorflow. I guess the driver stuff was just bringing the used device memory down so that tensorflow could initialise properly. Thanks!

synap5e commented Nov 2, 2016

Ah so the problem was that my system was using too much video memory even before initialising tensorflow. I guess the driver stuff was just bringing the used device memory down so that tensorflow could initialise properly. Thanks!

@zandaqo

This comment has been minimized.

Show comment
Hide comment
@zandaqo

zandaqo Nov 2, 2016

Guys, is it possible to build on Windows without MSVS? Windows 10 SDK is supposed to contain the C++ compiler, wouldn't that suffice for the task?

zandaqo commented Nov 2, 2016

Guys, is it possible to build on Windows without MSVS? Windows 10 SDK is supposed to contain the C++ compiler, wouldn't that suffice for the task?

@rongjiecomputer

This comment has been minimized.

Show comment
Hide comment
@rongjiecomputer

rongjiecomputer Nov 2, 2016

Contributor

@zandaqo You only need standalone MSVC compiler with Windows 10 SDK and CMake, so there is no need to install the whole Visual Studio. Windows 10 SDK contains dll, static libraries, header files and source codes for the libraries and some useful tools, but it does not contain compiler.

Contributor

rongjiecomputer commented Nov 2, 2016

@zandaqo You only need standalone MSVC compiler with Windows 10 SDK and CMake, so there is no need to install the whole Visual Studio. Windows 10 SDK contains dll, static libraries, header files and source codes for the libraries and some useful tools, but it does not contain compiler.

@ricardopieper

This comment has been minimized.

Show comment
Hide comment
@ricardopieper

ricardopieper Nov 3, 2016

Hello!

I'm new to both Python and Tensorflow, but I have done some MNIST stuff in the past. I followed the instructions on tensorflow/contrib/cmake/README.md, and it worked fine, GPU seems to be working fine as well. Tensorflow on Windows seems to be breaking in some places, as expected, and I just want to check whether my understanding of the breakage is right.

I tried to follow https://www.tensorflow.org/versions/r0.11/tutorials/mnist/beginners/index.html and it doesn't work, since this import path (tensorflow.examples.tutorials.mnist) doesnt exist. This is ultimately due to tf.contrib not being included in the pip package, right?

Just out of curiosity, I did something apparently pretty awful: I copied the contents of the tensorflow repo over the lib location at site-packages\tensorflow, which I expected to cause a lot of stuff to break. This is how it breaks:

  File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\contrib\framework\python\ops\variables.py", line 23, in <module>
    from tensorflow.contrib.framework.python.ops import gen_variable_ops
ImportError: cannot import name 'gen_variable_ops'

I couldn't find the definition of gen_variable_ops anywhere, but the documentation says that tf.load_op_library() is not currently implemented. So, gen_variable_ops is implemented somewhere else, which needs to be loaded using tf.load_op_library(). So, the lack of tf.load_op_library is what is causing the problem, right?

ricardopieper commented Nov 3, 2016

Hello!

I'm new to both Python and Tensorflow, but I have done some MNIST stuff in the past. I followed the instructions on tensorflow/contrib/cmake/README.md, and it worked fine, GPU seems to be working fine as well. Tensorflow on Windows seems to be breaking in some places, as expected, and I just want to check whether my understanding of the breakage is right.

I tried to follow https://www.tensorflow.org/versions/r0.11/tutorials/mnist/beginners/index.html and it doesn't work, since this import path (tensorflow.examples.tutorials.mnist) doesnt exist. This is ultimately due to tf.contrib not being included in the pip package, right?

Just out of curiosity, I did something apparently pretty awful: I copied the contents of the tensorflow repo over the lib location at site-packages\tensorflow, which I expected to cause a lot of stuff to break. This is how it breaks:

  File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\contrib\framework\python\ops\variables.py", line 23, in <module>
    from tensorflow.contrib.framework.python.ops import gen_variable_ops
ImportError: cannot import name 'gen_variable_ops'

I couldn't find the definition of gen_variable_ops anywhere, but the documentation says that tf.load_op_library() is not currently implemented. So, gen_variable_ops is implemented somewhere else, which needs to be loaded using tf.load_op_library(). So, the lack of tf.load_op_library is what is causing the problem, right?

@zandaqo

This comment has been minimized.

Show comment
Hide comment
@zandaqo

zandaqo Nov 3, 2016

I've managed to build successfully the pip package following the cmake path, and installed it with pip install tensorflow-0.11.0rc1_cmake_experimental-py3-none-any.whl which reported a successful installation. However, when I try to import tensorflow, I get the following errors:

>>> import tensorflow as tf
Traceback (most recent call last):
  File "C:\Users\Tester\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 18, in swig_import_helper
    return importlib.import_module(mname)
  File "C:\Users\Tester\AppData\Local\Programs\Python\Python35\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 577, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 906, in create_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
ImportError: DLL load failed: The specified module could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Tester\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\__init__.py", line 54, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "C:\Users\Tester\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 21, in <module>
    _pywrap_tensorflow = swig_import_helper()
  File "C:\Users\Tester\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 20, in swig_import_helper
    return importlib.import_module('_pywrap_tensorflow')
  File "C:\Users\Tester\AppData\Local\Programs\Python\Python35\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named '_pywrap_tensorflow'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\Tester\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\__init__.py", line 23, in <module>
    from tensorflow.python import *
  File "C:\Users\Tester\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\__init__.py", line 60, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "C:\Users\Tester\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 18, in swig_import_helper
    return importlib.import_module(mname)
  File "C:\Users\Tester\AppData\Local\Programs\Python\Python35\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 577, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 906, in create_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
ImportError: DLL load failed: The specified module could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Tester\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\__init__.py", line 54, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "C:\Users\Tester\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 21, in <module>
    _pywrap_tensorflow = swig_import_helper()
  File "C:\Users\Tester\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 20, in swig_import_helper
    return importlib.import_module('_pywrap_tensorflow')
  File "C:\Users\Tester\AppData\Local\Programs\Python\Python35\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named '_pywrap_tensorflow'


Error importing tensorflow.  Unless you are using bazel,
you should not try to import tensorflow from its source directory;
please exit the tensorflow source tree, and relaunch your python interpreter
from there.

Did I miss some dependency here or something was wrong with the build/installation?

zandaqo commented Nov 3, 2016

I've managed to build successfully the pip package following the cmake path, and installed it with pip install tensorflow-0.11.0rc1_cmake_experimental-py3-none-any.whl which reported a successful installation. However, when I try to import tensorflow, I get the following errors:

>>> import tensorflow as tf
Traceback (most recent call last):
  File "C:\Users\Tester\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 18, in swig_import_helper
    return importlib.import_module(mname)
  File "C:\Users\Tester\AppData\Local\Programs\Python\Python35\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 577, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 906, in create_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
ImportError: DLL load failed: The specified module could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Tester\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\__init__.py", line 54, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "C:\Users\Tester\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 21, in <module>
    _pywrap_tensorflow = swig_import_helper()
  File "C:\Users\Tester\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 20, in swig_import_helper
    return importlib.import_module('_pywrap_tensorflow')
  File "C:\Users\Tester\AppData\Local\Programs\Python\Python35\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named '_pywrap_tensorflow'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\Tester\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\__init__.py", line 23, in <module>
    from tensorflow.python import *
  File "C:\Users\Tester\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\__init__.py", line 60, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "C:\Users\Tester\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 18, in swig_import_helper
    return importlib.import_module(mname)
  File "C:\Users\Tester\AppData\Local\Programs\Python\Python35\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 577, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 906, in create_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
ImportError: DLL load failed: The specified module could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Tester\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\__init__.py", line 54, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "C:\Users\Tester\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 21, in <module>
    _pywrap_tensorflow = swig_import_helper()
  File "C:\Users\Tester\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 20, in swig_import_helper
    return importlib.import_module('_pywrap_tensorflow')
  File "C:\Users\Tester\AppData\Local\Programs\Python\Python35\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named '_pywrap_tensorflow'


Error importing tensorflow.  Unless you are using bazel,
you should not try to import tensorflow from its source directory;
please exit the tensorflow source tree, and relaunch your python interpreter
from there.

Did I miss some dependency here or something was wrong with the build/installation?

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Nov 3, 2016

@zandaqo, I got this problem when I first run tensorflow on Windows. You just need to compile the examples, and add the folder with the compiled examples to your path. When you compile the sample codes, it will also compile some DLLs needed for Tensorflow.

ghost commented Nov 3, 2016

@zandaqo, I got this problem when I first run tensorflow on Windows. You just need to compile the examples, and add the folder with the compiled examples to your path. When you compile the sample codes, it will also compile some DLLs needed for Tensorflow.

@zandaqo

This comment has been minimized.

Show comment
Hide comment
@zandaqo

zandaqo Nov 3, 2016

@ErivaldoJunior By compiling the examples do you mean this: MSBuild /p:Configuration=Release tf_tutorials_example_trainer.vcxproj? I did that before compiling the pip package. It compiles to .\Release, is that the folder to add to path? I have just tried adding it, but no luck so far.

I do see files named pywrap_tensor mentioned in the errors in that .\Release folder, maybe manually copying them somewhere might help Python to see them. Not sure where though.

zandaqo commented Nov 3, 2016

@ErivaldoJunior By compiling the examples do you mean this: MSBuild /p:Configuration=Release tf_tutorials_example_trainer.vcxproj? I did that before compiling the pip package. It compiles to .\Release, is that the folder to add to path? I have just tried adding it, but no luck so far.

I do see files named pywrap_tensor mentioned in the errors in that .\Release folder, maybe manually copying them somewhere might help Python to see them. Not sure where though.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Nov 3, 2016

@zandaqo, that is right. I just add that Release folder to my Windows path and it worked. However, I tested by launching python my_tensorflow_script.py from a CMD window. I don't know if it work if you use some kind of IDE or iPython.

ghost commented Nov 3, 2016

@zandaqo, that is right. I just add that Release folder to my Windows path and it worked. However, I tested by launching python my_tensorflow_script.py from a CMD window. I don't know if it work if you use some kind of IDE or iPython.

@zandaqo

This comment has been minimized.

Show comment
Hide comment
@zandaqo

zandaqo Nov 3, 2016

@ErivaldoJunior Thanks, you were right about missing DLLs, though in my case it turned out to be zlib.dll that was missing from both the package and .\Release folder. I've manually copied zlib.dll into the folder, as it was suggested here and the import now works.

zandaqo commented Nov 3, 2016

@ErivaldoJunior Thanks, you were right about missing DLLs, though in my case it turned out to be zlib.dll that was missing from both the package and .\Release folder. I've manually copied zlib.dll into the folder, as it was suggested here and the import now works.

@icoxfog417

This comment has been minimized.

Show comment
Hide comment
@icoxfog417

icoxfog417 Nov 5, 2016

I successed to build the tensorflow! But cmake 3.3.1 causes build error, 3.6.3 works fine.

icoxfog417 commented Nov 5, 2016

I successed to build the tensorflow! But cmake 3.3.1 causes build error, 3.6.3 works fine.

@martinwicke

This comment has been minimized.

Show comment
Hide comment
@martinwicke

martinwicke Nov 5, 2016

Member

Good to know! We'd welcome a PR with an appropriate minimum version
statement in the cmakelist file.

On Saturday, November 5, 2016, Takahiro Kubo notifications@github.com
wrote:

I successed to build the tensorflow! But cmake 3.3.1 causes build error,
3.6.3 works fine.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#17 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAjO_Ys4MI03pcc3tCR_BzsqIXFrQTTcks5q7RVRgaJpZM4GexU4
.

Member

martinwicke commented Nov 5, 2016

Good to know! We'd welcome a PR with an appropriate minimum version
statement in the cmakelist file.

On Saturday, November 5, 2016, Takahiro Kubo notifications@github.com
wrote:

I successed to build the tensorflow! But cmake 3.3.1 causes build error,
3.6.3 works fine.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#17 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAjO_Ys4MI03pcc3tCR_BzsqIXFrQTTcks5q7RVRgaJpZM4GexU4
.

Carmezim added a commit to Carmezim/tensorflow that referenced this issue Nov 7, 2016

@Carmezim

This comment has been minimized.

Show comment
Hide comment
@Carmezim

Carmezim Nov 7, 2016

Contributor

@martinwicke as in here it seems the minimum known working Cmake version is 3.5. Should I change minimum requirement to 3.5 and update the readme for minimum 3.5 up to 3.6?

Contributor

Carmezim commented Nov 7, 2016

@martinwicke as in here it seems the minimum known working Cmake version is 3.5. Should I change minimum requirement to 3.5 and update the readme for minimum 3.5 up to 3.6?

@komoku

This comment has been minimized.

Show comment
Hide comment
@komoku

komoku Nov 7, 2016

Nice to see that TensorFlow can now work on Windows with GPU now. Are there plans for a version that need not be installed from sources? And if so, any ETA on that? It would be great if the setup process were as straightforward as on Linux, I'm using TensorFlow on Linux without problems and would like to do so on Windows, but the requisites and setup process documented in the readme currently looks a bit cumbersome for those of us that don't have much time...

komoku commented Nov 7, 2016

Nice to see that TensorFlow can now work on Windows with GPU now. Are there plans for a version that need not be installed from sources? And if so, any ETA on that? It would be great if the setup process were as straightforward as on Linux, I'm using TensorFlow on Linux without problems and would like to do so on Windows, but the requisites and setup process documented in the readme currently looks a bit cumbersome for those of us that don't have much time...

@meteorcloudy

This comment has been minimized.

Show comment
Hide comment
@meteorcloudy

meteorcloudy Nov 7, 2016

Member

Hey guys! With the release of Bazel 0.4.0, TensorFlow PIP package can now build with Bazel on Windows.
Thanks to @petemounce's contribution, you can use choco install bazel --version 0.4.0 to install Bazel easily.

@gunan has already set up a ci job for it: http://ci.tensorflow.org/job/tensorflow-pr-win-bazel/
Basically, we are using this script. So with proper modification to the environment variables (if your installations of Visual Studio, Python 3 or msys is not at the standard places), you'll be able to build the PIP package with Bazel as well!

Update: I would recommend to run the commands in the script manually if you have trouble running it directly.

Member

meteorcloudy commented Nov 7, 2016

Hey guys! With the release of Bazel 0.4.0, TensorFlow PIP package can now build with Bazel on Windows.
Thanks to @petemounce's contribution, you can use choco install bazel --version 0.4.0 to install Bazel easily.

@gunan has already set up a ci job for it: http://ci.tensorflow.org/job/tensorflow-pr-win-bazel/
Basically, we are using this script. So with proper modification to the environment variables (if your installations of Visual Studio, Python 3 or msys is not at the standard places), you'll be able to build the PIP package with Bazel as well!

Update: I would recommend to run the commands in the script manually if you have trouble running it directly.

@KhabarlakKonstantin

This comment has been minimized.

Show comment
Hide comment
@KhabarlakKonstantin

KhabarlakKonstantin Nov 7, 2016

Contributor

@meteorcloudy Thanks for update!
Build with bazel did not work for me. I get ERROR: CreateFile(C:\tmp\Bazel\44EoGNou\install)
Any way to debug that? I have localized windows (russian), maybe that's the cause

Full log. Running in PowerShell as admin:

C:\libs\tensorflow>c:\tools\msys64\usr\bin\bash -l C:\libs\tensorflow/tensorflow/tools/ci_build/windows/cpu/pip/build_tf_windows.sh
+ set -e
++ dirname 'C:\libs\tensorflow/tensorflow/tools/ci_build/windows/cpu/pip/build_tf_windows.sh'
+ script_dir='C:\libs\tensorflow/tensorflow/tools/ci_build/windows/cpu/pip'
+ cd 'C:\libs\tensorflow/'
+ export TMPDIR=C:/tmp
+ TMPDIR=C:/tmp
+ export BAZEL_SH=C:/tools/msys64/usr/bin/bash
+ BAZEL_SH=C:/tools/msys64/usr/bin/bash
+ export 'PYTHON_BIN_PATH=C:\tools\Anaconda3/python'
+ PYTHON_BIN_PATH='C:\tools\Anaconda3/python'
+ export 'BAZEL_PYTHON=C:\tools\Anaconda3/python'
+ BAZEL_PYTHON='C:\tools\Anaconda3/python'
+ export 'BAZEL_VS=C:/Program Files (x86)/Microsoft Visual Studio 14.0'
+ BAZEL_VS='C:/Program Files (x86)/Microsoft Visual Studio 14.0'
+ export 'PATH=/c/tools/bazel:/c/Program Files/Anaconda3:/usr/local/bin:/usr/bin:/bin:/opt/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/'
+ PATH='/c/tools/bazel:/c/Program Files/Anaconda3:/usr/local/bin:/usr/bin:/bin:/opt/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/'
+ bazel clean
Extracting Bazel installation...
ERROR: CreateFile(C:\tmp\Bazel\44EoGNou\install): ▒▒ ▒▒▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒ ▒▒▒▒.
 (2)
.....................................................................................................................................................................................................................................................................................................................................
INFO: Starting clean (this may take a while). Consider using --expunge_async if the clean takes more than several minutes.
++ bazel info output_base
+ output_base=C:/tmp/Bazel/44EoGNou
+ bazel shutdown
+ rm -rf C:/tmp/Bazel/44EoGNou
rm: невозможно удалить 'C:/tmp/Bazel/44EoGNou/server/jvm.out': Device or resource busy
Contributor

KhabarlakKonstantin commented Nov 7, 2016

@meteorcloudy Thanks for update!
Build with bazel did not work for me. I get ERROR: CreateFile(C:\tmp\Bazel\44EoGNou\install)
Any way to debug that? I have localized windows (russian), maybe that's the cause

Full log. Running in PowerShell as admin:

C:\libs\tensorflow>c:\tools\msys64\usr\bin\bash -l C:\libs\tensorflow/tensorflow/tools/ci_build/windows/cpu/pip/build_tf_windows.sh
+ set -e
++ dirname 'C:\libs\tensorflow/tensorflow/tools/ci_build/windows/cpu/pip/build_tf_windows.sh'
+ script_dir='C:\libs\tensorflow/tensorflow/tools/ci_build/windows/cpu/pip'
+ cd 'C:\libs\tensorflow/'
+ export TMPDIR=C:/tmp
+ TMPDIR=C:/tmp
+ export BAZEL_SH=C:/tools/msys64/usr/bin/bash
+ BAZEL_SH=C:/tools/msys64/usr/bin/bash
+ export 'PYTHON_BIN_PATH=C:\tools\Anaconda3/python'
+ PYTHON_BIN_PATH='C:\tools\Anaconda3/python'
+ export 'BAZEL_PYTHON=C:\tools\Anaconda3/python'
+ BAZEL_PYTHON='C:\tools\Anaconda3/python'
+ export 'BAZEL_VS=C:/Program Files (x86)/Microsoft Visual Studio 14.0'
+ BAZEL_VS='C:/Program Files (x86)/Microsoft Visual Studio 14.0'
+ export 'PATH=/c/tools/bazel:/c/Program Files/Anaconda3:/usr/local/bin:/usr/bin:/bin:/opt/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/'
+ PATH='/c/tools/bazel:/c/Program Files/Anaconda3:/usr/local/bin:/usr/bin:/bin:/opt/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/'
+ bazel clean
Extracting Bazel installation...
ERROR: CreateFile(C:\tmp\Bazel\44EoGNou\install): ▒▒ ▒▒▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒ ▒▒▒▒.
 (2)
.....................................................................................................................................................................................................................................................................................................................................
INFO: Starting clean (this may take a while). Consider using --expunge_async if the clean takes more than several minutes.
++ bazel info output_base
+ output_base=C:/tmp/Bazel/44EoGNou
+ bazel shutdown
+ rm -rf C:/tmp/Bazel/44EoGNou
rm: невозможно удалить 'C:/tmp/Bazel/44EoGNou/server/jvm.out': Device or resource busy
@petemounce

This comment has been minimized.

Show comment
Hide comment
@petemounce

petemounce Nov 7, 2016

@KhabarlakKonstantin That's (ERROR: CreateFile(C:\tmp\Bazel\44EoGNou\install)) bazelbuild/bazel#1744 I think. It only happens the first time after bazel is installed. There don't seem to be any repercussions.

petemounce commented Nov 7, 2016

@KhabarlakKonstantin That's (ERROR: CreateFile(C:\tmp\Bazel\44EoGNou\install)) bazelbuild/bazel#1744 I think. It only happens the first time after bazel is installed. There don't seem to be any repercussions.

@meteorcloudy

This comment has been minimized.

Show comment
Hide comment
@meteorcloudy

meteorcloudy Nov 7, 2016

Member

@KhabarlakKonstantin As @petemounce pointed out, you can safely ignore that error. And you can also skip rm -rf C:/tmp/Bazel/44EoGNou if the Device or resource busy error is blocking you. I guess it's because it tried to remove jvm.out before jvm fully shutdown after invoking bazel shutdown.

Member

meteorcloudy commented Nov 7, 2016

@KhabarlakKonstantin As @petemounce pointed out, you can safely ignore that error. And you can also skip rm -rf C:/tmp/Bazel/44EoGNou if the Device or resource busy error is blocking you. I guess it's because it tried to remove jvm.out before jvm fully shutdown after invoking bazel shutdown.

@KhabarlakKonstantin

This comment has been minimized.

Show comment
Hide comment
@KhabarlakKonstantin

KhabarlakKonstantin Nov 7, 2016

Contributor

@petemounce @meteorcloudy Thanks for help
The problem is that it doesn't start building. I've commented out bazel shutdown and it goes now a little bit furhter, but still crashes

INFO: Starting clean (this may take a while). Consider using --expunge_async if the clean takes more than several minutes.
++ bazel info output_base
+ output_base=C:/tmp/Bazel/44EoGNou
+ echo ''
+ ./configure
/c/libs/tensorflow /c/libs/tensorflow
Found possible Python library paths:
  C:\Program Files\Anaconda3\lib\site-packages
  C:\Program Files\Anaconda3
Please input the desired Python library path to use.  Default is [C:\Program Files\Anaconda3\lib\site-packages]
Using python library path: C:\Program Files\Anaconda3\lib\site-packages
Junction created for util\python\python_include <<===>> C:\Program Files\Anaconda3\include
Junction created for util\python\python_lib <<===>> C:\Program Files\Anaconda3\lib\site-packages
Junction created for third_party\py\numpy\numpy_include <<===>> C:\Program Files\Anaconda3\lib\site-packages\numpy\core\include

No more output here

Contributor

KhabarlakKonstantin commented Nov 7, 2016

@petemounce @meteorcloudy Thanks for help
The problem is that it doesn't start building. I've commented out bazel shutdown and it goes now a little bit furhter, but still crashes

INFO: Starting clean (this may take a while). Consider using --expunge_async if the clean takes more than several minutes.
++ bazel info output_base
+ output_base=C:/tmp/Bazel/44EoGNou
+ echo ''
+ ./configure
/c/libs/tensorflow /c/libs/tensorflow
Found possible Python library paths:
  C:\Program Files\Anaconda3\lib\site-packages
  C:\Program Files\Anaconda3
Please input the desired Python library path to use.  Default is [C:\Program Files\Anaconda3\lib\site-packages]
Using python library path: C:\Program Files\Anaconda3\lib\site-packages
Junction created for util\python\python_include <<===>> C:\Program Files\Anaconda3\include
Junction created for util\python\python_lib <<===>> C:\Program Files\Anaconda3\lib\site-packages
Junction created for third_party\py\numpy\numpy_include <<===>> C:\Program Files\Anaconda3\lib\site-packages\numpy\core\include

No more output here

@meteorcloudy

This comment has been minimized.

Show comment
Hide comment
@meteorcloudy

meteorcloudy Nov 7, 2016

Member

@KhabarlakKonstantin It seems OpenCL configuration is just added into ./configure but not turned off by default on Windows, so please manually run that script or add export TF_NEED_OPENCL=0 before echo "" | ./configure

pcloudy@PCLOUDY1-W MSYS ~/workspace/tensorflow
$ ./configure
~/workspace/tensorflow ~/workspace/tensorflow
Please specify the location of python. [Default is /c/Program Files/Anaconda3/python]:
Found possible Python library paths:
  C:\Program Files\Anaconda3\lib\site-packages
  C:\Program Files\Anaconda3
Please input the desired Python library path to use.  Default is [C:\Program Files\Anaconda3\lib\site-packages]

Using python library path: C:\Program Files\Anaconda3\lib\site-packages
Junction created for util\python\python_include <<===>> C:\Program Files\Anaconda3\include
Junction created for util\python\python_lib <<===>> C:\Program Files\Anaconda3\lib\site-packages
Junction created for third_party\py\numpy\numpy_include <<===>> C:\Program Files\Anaconda3\lib\site-packages\numpy\core\include
Do you wish to build TensorFlow with OpenCL support? [y/N] n
No OpenCL support will be enabled for TensorFlow
Configuration finished
Member

meteorcloudy commented Nov 7, 2016

@KhabarlakKonstantin It seems OpenCL configuration is just added into ./configure but not turned off by default on Windows, so please manually run that script or add export TF_NEED_OPENCL=0 before echo "" | ./configure

pcloudy@PCLOUDY1-W MSYS ~/workspace/tensorflow
$ ./configure
~/workspace/tensorflow ~/workspace/tensorflow
Please specify the location of python. [Default is /c/Program Files/Anaconda3/python]:
Found possible Python library paths:
  C:\Program Files\Anaconda3\lib\site-packages
  C:\Program Files\Anaconda3
Please input the desired Python library path to use.  Default is [C:\Program Files\Anaconda3\lib\site-packages]

Using python library path: C:\Program Files\Anaconda3\lib\site-packages
Junction created for util\python\python_include <<===>> C:\Program Files\Anaconda3\include
Junction created for util\python\python_lib <<===>> C:\Program Files\Anaconda3\lib\site-packages
Junction created for third_party\py\numpy\numpy_include <<===>> C:\Program Files\Anaconda3\lib\site-packages\numpy\core\include
Do you wish to build TensorFlow with OpenCL support? [y/N] n
No OpenCL support will be enabled for TensorFlow
Configuration finished
@Carmezim

This comment has been minimized.

Show comment
Hide comment
@Carmezim

Carmezim Nov 8, 2016

Contributor

Is anybody else having these errors with Pragma (ignore pywrap one)?

Building with GPU and all specs in accord to readme.

Contributor

Carmezim commented Nov 8, 2016

Is anybody else having these errors with Pragma (ignore pywrap one)?

Building with GPU and all specs in accord to readme.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Nov 8, 2016

@Carmezim, it worked fine for me. I did not get any of these errors.

ghost commented Nov 8, 2016

@Carmezim, it worked fine for me. I did not get any of these errors.

@guschmue

This comment has been minimized.

Show comment
Hide comment
@guschmue

guschmue Nov 8, 2016

Contributor

I have a pr to fix this here: #5421

Contributor

guschmue commented Nov 8, 2016

I have a pr to fix this here: #5421

@Carmezim

This comment has been minimized.

Show comment
Hide comment
@Carmezim

Carmezim Nov 8, 2016

Contributor

@guschmue Nice! Thanks for the quick response

Contributor

Carmezim commented Nov 8, 2016

@guschmue Nice! Thanks for the quick response

@splinter89

This comment has been minimized.

Show comment
Hide comment
@splinter89

splinter89 Nov 8, 2016

After fixing _Pragma, this is what I get in the same file:

C:/tensorflow/tensorflow/core/kernels/parameterized_truncated_normal_op_gpu.cu.cc(168): error : more than
one operator "/" matches these operands: [C:\tensorflow\tensorflow\contrib\cmake\build\tf_core_gpu_kernels.v
cxproj]

splinter89 commented Nov 8, 2016

After fixing _Pragma, this is what I get in the same file:

C:/tensorflow/tensorflow/core/kernels/parameterized_truncated_normal_op_gpu.cu.cc(168): error : more than
one operator "/" matches these operands: [C:\tensorflow\tensorflow\contrib\cmake\build\tf_core_gpu_kernels.v
cxproj]
@guschmue

This comment has been minimized.

Show comment
Hide comment
@guschmue

guschmue Nov 8, 2016

Contributor

#5421 will fix this as well.

Contributor

guschmue commented Nov 8, 2016

#5421 will fix this as well.

@edwin100394

This comment has been minimized.

Show comment
Hide comment
@edwin100394

edwin100394 Nov 8, 2016

Can I build with GPU support using bazel?

edwin100394 commented Nov 8, 2016

Can I build with GPU support using bazel?

@gunan

This comment has been minimized.

Show comment
Hide comment
@gunan

gunan Nov 8, 2016

Member

@edwin100394 no GPU support on windows using bazel yet.
We are still working on it.

On Mon, Nov 7, 2016 at 9:33 PM, edwin100394 notifications@github.com
wrote:

Can I build with GPU support using bazel?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#17 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHlCOXNRNoMFmnSPfnkTMLsRHcIcl9TXks5q8AmigaJpZM4GexU4
.

Member

gunan commented Nov 8, 2016

@edwin100394 no GPU support on windows using bazel yet.
We are still working on it.

On Mon, Nov 7, 2016 at 9:33 PM, edwin100394 notifications@github.com
wrote:

Can I build with GPU support using bazel?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#17 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHlCOXNRNoMFmnSPfnkTMLsRHcIcl9TXks5q8AmigaJpZM4GexU4
.

@KhabarlakKonstantin

This comment has been minimized.

Show comment
Hide comment
@KhabarlakKonstantin

KhabarlakKonstantin Nov 8, 2016

Contributor

@meteorcloudy Adding export TF_NEED_OPENCL=0 helped me to go a little further

Now I'm getting another error:

ERROR: C:/libs/tensorflow/tensorflow/core/BUILD:1115:1: Executing genrule //tensorflow/core:version_info_gen failed: bash failed: error executing command
  cd C:/tmp/Bazel/44EoGNou/execroot/tensorflow
  SET PATH=C:\tools;C:\tools\Anaconda;C:\tools\msys64\usr\local\bin;C:\tools\msys64\usr\bin;C:\tools\msys64\usr\bin;C:\tools\msys64\opt\bin;C:\Windows\System32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\tools\msys64\usr\bin\site_perl;C:\tools\msys64\usr\bin\vendor_perl;C:\tools\msys64\usr\bin\core_perl
  C:/tools/msys64/usr/bin/bash -c source external/bazel_tools/tools/genrule/genrule-setup.sh; tensorflow/tools/git/gen_git_source.py --generate tensorflow/tools/git/gen/spec.json tensorflow/tools/git/gen/head tensorflow/tools/git/gen/branch_ref "bazel-out/vc_14_0_x64-py3-opt/genfiles/tensorflow/core/util/version_info.cc": com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1
Traceback (most recent call last):
  File "tensorflow/tools/git/gen_git_source.py", line 260, in <module>
    generate(args.generate)
  File "tensorflow/tools/git/gen_git_source.py", line 212, in generate
    git_version = get_git_version(data["path"])
  File "tensorflow/tools/git/gen_git_source.py", line 152, in get_git_version
    str("--work-tree=" + git_base_path), "describe", "--long", "--dirty", "--tags"
  File "C:\tools\Anaconda\lib\subprocess.py", line 626, in check_output
    **kwargs).stdout
  File "C:\tools\Anaconda\lib\subprocess.py", line 693, in run
    with Popen(*popenargs, **kwargs) as process:
  File "C:\tools\Anaconda\lib\subprocess.py", line 947, in __init__
    restore_signals, start_new_session)
  File "C:\tools\Anaconda\lib\subprocess.py", line 1224, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
Target //tensorflow/tools/pip_package:build_pip_package failed to build
INFO: Elapsed time: 10.997s, Critical Path: 3.44s
FAILED: Build did NOT complete successfully
Contributor

KhabarlakKonstantin commented Nov 8, 2016

@meteorcloudy Adding export TF_NEED_OPENCL=0 helped me to go a little further

Now I'm getting another error:

ERROR: C:/libs/tensorflow/tensorflow/core/BUILD:1115:1: Executing genrule //tensorflow/core:version_info_gen failed: bash failed: error executing command
  cd C:/tmp/Bazel/44EoGNou/execroot/tensorflow
  SET PATH=C:\tools;C:\tools\Anaconda;C:\tools\msys64\usr\local\bin;C:\tools\msys64\usr\bin;C:\tools\msys64\usr\bin;C:\tools\msys64\opt\bin;C:\Windows\System32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\tools\msys64\usr\bin\site_perl;C:\tools\msys64\usr\bin\vendor_perl;C:\tools\msys64\usr\bin\core_perl
  C:/tools/msys64/usr/bin/bash -c source external/bazel_tools/tools/genrule/genrule-setup.sh; tensorflow/tools/git/gen_git_source.py --generate tensorflow/tools/git/gen/spec.json tensorflow/tools/git/gen/head tensorflow/tools/git/gen/branch_ref "bazel-out/vc_14_0_x64-py3-opt/genfiles/tensorflow/core/util/version_info.cc": com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1
Traceback (most recent call last):
  File "tensorflow/tools/git/gen_git_source.py", line 260, in <module>
    generate(args.generate)
  File "tensorflow/tools/git/gen_git_source.py", line 212, in generate
    git_version = get_git_version(data["path"])
  File "tensorflow/tools/git/gen_git_source.py", line 152, in get_git_version
    str("--work-tree=" + git_base_path), "describe", "--long", "--dirty", "--tags"
  File "C:\tools\Anaconda\lib\subprocess.py", line 626, in check_output
    **kwargs).stdout
  File "C:\tools\Anaconda\lib\subprocess.py", line 693, in run
    with Popen(*popenargs, **kwargs) as process:
  File "C:\tools\Anaconda\lib\subprocess.py", line 947, in __init__
    restore_signals, start_new_session)
  File "C:\tools\Anaconda\lib\subprocess.py", line 1224, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
Target //tensorflow/tools/pip_package:build_pip_package failed to build
INFO: Elapsed time: 10.997s, Critical Path: 3.44s
FAILED: Build did NOT complete successfully
@KhabarlakKonstantin

This comment has been minimized.

Show comment
Hide comment
@KhabarlakKonstantin

KhabarlakKonstantin Nov 8, 2016

Contributor

I've started from scratch and I've build bazel from sources. Now it building almost till the end

It fails at link time in the end:

ERROR: C:/libs/tensorflow/tensorflow/python/BUILD:1907:1: Linking of rule '//tensorflow/python:_pywrap_tensorflow.so' failed: msvc_link.bat failed: error executing command
  cd C:/tmp/Bazel/44EoGNou/execroot/tensorflow
  SET PATH=external/local_config_cc/wrapper/bin
  external/local_config_cc/wrapper/bin/msvc_link.bat /DLL /WHOLEARCHIVE -pthread -m64 -Xcompilation-mode=opt -Wl,@bazel-out/vc_14_0_x64-py3-opt/bin/tensorflow/python/_pywrap_tensorflow.so-2.params: com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1169
Warning: Unmatched arguments: -ldl -lm -ldl -lm
Warning: Unmatched arguments: -pthread
libversion_lib.a(version_info.o) : error LNK2005: "char const * __cdecl tf_compiler_version(void)" (?tf_compiler_version@@YAPEBDXZ) already defined in libframework_internal.lo(version_info.o)
libversion_lib.a(version_info.o) : error LNK2005: "char const * __cdecl tf_git_version(void)" (?tf_git_version@@YAPEBDXZ) already defined in libframework_internal.lo(version_info.o)
   Creating library bazel-out/vc_14_0_x64-py3-opt/bin/tensorflow/python/_pywrap_tensorflow.lib and object bazel-out/vc_14_0_x64-py3-opt/bin/tensorflow/python/_pywrap_tensorflow.exp
bazel-out/vc_14_0_x64-py3-opt/bin/tensorflow/python/_pywrap_tensorflow.so : fatal error LNK1169: one or more multiply defined symbols found
ERROR: C:/libs/tensorflow/tensorflow/python/BUILD:639:1: output 'tensorflow/python/gen_control_flow_ops_py_wrappers_cc.exe' was not created
ERROR: C:/libs/tensorflow/tensorflow/python/BUILD:698:1: output 'tensorflow/python/gen_resource_variable_ops_py_wrappers_cc.exe' was not created
Target //tensorflow/tools/pip_package:build_pip_package failed to build

Contributor

KhabarlakKonstantin commented Nov 8, 2016

I've started from scratch and I've build bazel from sources. Now it building almost till the end

It fails at link time in the end:

ERROR: C:/libs/tensorflow/tensorflow/python/BUILD:1907:1: Linking of rule '//tensorflow/python:_pywrap_tensorflow.so' failed: msvc_link.bat failed: error executing command
  cd C:/tmp/Bazel/44EoGNou/execroot/tensorflow
  SET PATH=external/local_config_cc/wrapper/bin
  external/local_config_cc/wrapper/bin/msvc_link.bat /DLL /WHOLEARCHIVE -pthread -m64 -Xcompilation-mode=opt -Wl,@bazel-out/vc_14_0_x64-py3-opt/bin/tensorflow/python/_pywrap_tensorflow.so-2.params: com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1169
Warning: Unmatched arguments: -ldl -lm -ldl -lm
Warning: Unmatched arguments: -pthread
libversion_lib.a(version_info.o) : error LNK2005: "char const * __cdecl tf_compiler_version(void)" (?tf_compiler_version@@YAPEBDXZ) already defined in libframework_internal.lo(version_info.o)
libversion_lib.a(version_info.o) : error LNK2005: "char const * __cdecl tf_git_version(void)" (?tf_git_version@@YAPEBDXZ) already defined in libframework_internal.lo(version_info.o)
   Creating library bazel-out/vc_14_0_x64-py3-opt/bin/tensorflow/python/_pywrap_tensorflow.lib and object bazel-out/vc_14_0_x64-py3-opt/bin/tensorflow/python/_pywrap_tensorflow.exp
bazel-out/vc_14_0_x64-py3-opt/bin/tensorflow/python/_pywrap_tensorflow.so : fatal error LNK1169: one or more multiply defined symbols found
ERROR: C:/libs/tensorflow/tensorflow/python/BUILD:639:1: output 'tensorflow/python/gen_control_flow_ops_py_wrappers_cc.exe' was not created
ERROR: C:/libs/tensorflow/tensorflow/python/BUILD:698:1: output 'tensorflow/python/gen_resource_variable_ops_py_wrappers_cc.exe' was not created
Target //tensorflow/tools/pip_package:build_pip_package failed to build

@mrry

This comment has been minimized.

Show comment
Hide comment
@mrry

mrry Nov 9, 2016

Contributor

Hi folks, now that rudimentary Windows support is in place, I am going to lock this issue for new comments, but keep it open until we have a stable release. Going forward:

  • If you have an issue, please open a new issue against TensorFlow to describe your problem, and fill out the standard issue template. This will help us to track and assign the remaining work that we have to do to get TensorFlow-on-Windows released.
  • We will continue to use this issue for (rare) announcements about Windows support, so you can continue to subscribe to the issue for a low-traffic feed about improvements to TensorFlow-on-Windows.

Once again, thanks for all your interest in TensorFlow-on-Windows, and now we're going to get back to work!

Contributor

mrry commented Nov 9, 2016

Hi folks, now that rudimentary Windows support is in place, I am going to lock this issue for new comments, but keep it open until we have a stable release. Going forward:

  • If you have an issue, please open a new issue against TensorFlow to describe your problem, and fill out the standard issue template. This will help us to track and assign the remaining work that we have to do to get TensorFlow-on-Windows released.
  • We will continue to use this issue for (rare) announcements about Windows support, so you can continue to subscribe to the issue for a low-traffic feed about improvements to TensorFlow-on-Windows.

Once again, thanks for all your interest in TensorFlow-on-Windows, and now we're going to get back to work!

@tensorflow tensorflow locked and limited conversation to collaborators Nov 9, 2016

@mrry

This comment has been minimized.

Show comment
Hide comment
@mrry

mrry Nov 29, 2016

Contributor

Today we announced native Windows support in TensorFlow 0.12, 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

Now that Windows is a supported configuration, I'm going to close this issue; please open a new issue if you have problems with these packages. There are still some discrepancies between the Windows package and the other platforms, which are outlined in the release notes. We'll be working over the next few weeks to close these gaps.

Thanks for all of your interest in TensorFlow on Windows!

Contributor

mrry commented Nov 29, 2016

Today we announced native Windows support in TensorFlow 0.12, 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

Now that Windows is a supported configuration, I'm going to close this issue; please open a new issue if you have problems with these packages. There are still some discrepancies between the Windows package and the other platforms, which are outlined in the release notes. We'll be working over the next few weeks to close these gaps.

Thanks for all of your interest in TensorFlow on Windows!

@mrry mrry closed this Nov 29, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.