1

I followed the instructions on this page and managed to install TensorFlow via pip within Visual Studio 2015. My Python environment runs in Enthought Canopy. The installation was successful. I refreshed the DB, and auto-completion via IntelliSense was available when I wrote the following line:

from tensorflow.examples.tutorials.mnist import input_data

However, when I run it in the REPL, I see the following error message:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
        File "C:\Users\User\AppData\Local\Enthought\Canopy\User\lib\site-packages\tensorflow\__init__.py", line 23, in <module>
        from tensorflow.python import *
File "C:\Users\User\AppData\Local\Enthought\Canopy\User\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
        from tensorflow import contrib
        File "C:\Users\User\AppData\Local\Enthought\Canopy\User\lib\site-packages\tensorflow\contrib\__init__.py", line 23, in <module>
        from tensorflow.contrib import layers
        File "C:\Users\User\AppData\Local\Enthought\Canopy\User\lib\site-packages\tensorflow\contrib\layers\__init__.py", line 68, in <module>
        from tensorflow.contrib.layers.python.layers import *
File "C:\Users\User\AppData\Local\Enthought\Canopy\User\lib\site-packages\tensorflow\contrib\layers\python\layers\__init__.py", line 22, in <module>
        from tensorflow.contrib.layers.python.layers.initializers import *
File "C:\Users\User\AppData\Local\Enthought\Canopy\User\lib\site-packages\tensorflow\contrib\layers\python\layers\initializers.py", line 24, in <module>
        from tensorflow.python.ops import random_ops
        File "C:\Users\User\AppData\Local\Enthought\Canopy\User\lib\site-packages\tensorflow\python\ops\random_ops.py", line 23, in <module>
        from tensorflow.python.framework import ops
        File "C:\Users\User\AppData\Local\Enthought\Canopy\User\lib\site-packages\tensorflow\python\framework\ops.py", line 39, in <module>
        from tensorflow.python.framework import versions
        File "C:\Users\User\AppData\Local\Enthought\Canopy\User\lib\site-packages\tensorflow\python\framework\versions.py", line 22, in <module>
        from tensorflow.python import pywrap_tensorflow
        File "C:\Users\User\AppData\Local\Enthought\Canopy\User\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 28, in <module>
        _pywrap_tensorflow = swig_import_helper()
File "C:\Users\User\AppData\Local\Enthought\Canopy\User\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 20, in swig_import_helper
import _pywrap_tensorflow
ImportError: No module named _pywrap_tensorflow

Can anyone shed some light on why I get the message ImportError: No module named _pywrap_tensorflow even though the installation of TensorFlow took place without a hiccup? Any suggestions on how I can resolve this issue?

Juan Leni
  • 6,982
  • 5
  • 55
  • 87
M.Y. Babt
  • 2,733
  • 7
  • 27
  • 49

1 Answers1

2

The current version of TensorFlow does not support running on Windows. In particular, the PIP packages available here are for Linux and Mac OS X only: they include a native compiled library called _pywrap_tensorflow that has not been compiled for Windows.

As suggested in another answer, you can run TensorFlow on Windows using a Docker container. There is an open issue on GitHub concerning better Windows support, but this will depend on Bazel adding support for Windows build (currently targeted for later this year).

Community
  • 1
  • 1
mrry
  • 125,488
  • 26
  • 399
  • 400