3

I am running Python 2.7.10 and I successfully installed TensorFlow, usingpip install https://storage.googleapis.com/tensorflow/mac/tensorflow-0.5.0-py2-none-any.whl.

When I run thepython interpreter and attempt to import thetensorflow module, I get the following error:

>>> import tensorflow as tfTraceback (most recent call last):  File "<stdin>", line 1, in <module>  File "C:\Users\Or\AppData\Local\Enthought\Canopy\User\lib\site-packages\tensorflow\__init__.py", line 4, in <module>    from tensorflow.python import *  File "C:\Users\Or\AppData\Local\Enthought\Canopy\User\lib\site-packages\tensorflow\python\__init__.py", line 22, in <module>    from tensorflow.python.client.client_lib import *  File "C:\Users\Or\AppData\Local\Enthought\Canopy\User\lib\site-packages\tensorflow\python\client\client_lib.py", line 35, in <module>    from tensorflow.python.client.session import InteractiveSession  File "C:\Users\Or\AppData\Local\Enthought\Canopy\User\lib\site-packages\tensorflow\python\client\session.py", line 11, in <module>    from tensorflow.python import pywrap_tensorflow as tf_session  File "C:\Users\Or\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\Or\AppData\Local\Enthought\Canopy\User\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 20, in swig_import_helper    import _pywrap_tensorflowImportError: No module named _pywrap_tensorflow
mrry's user avatar
mrry
126k27 gold badges404 silver badges401 bronze badges
askedFeb 8, 2016 at 19:07
user2154591's user avatar

2 Answers2

6

you can use pip to install tensorflow

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

If you are trying to install on windows , you will have to have python3.5 x64 bit and along with that you need to install Visual C++ 2015 redistributable (x64 version) to be able to import tensorflow

answeredDec 7, 2016 at 13:18
Jibin Mathew's user avatar
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks so much. I had tensorflow installed and the version was 0.12.1. But still had problem. Installing the one in this answer solved the problem.
4

Judging by the paths in the output, it looks like you are trying to run TensorFlow on Windows. The package that you have installed is a Mac OS X binary distribution of TensorFlow.

Unfortunately, Windows isnot currently supported by TensorFlow, and it is unlikely to be supported before its build system (Bazel) adds Windows support. There is some discussion of progress towards a Windows version on thisGitHub issue, and anunsupported contribution that builds TensorFlow using CMake on Windows.

answeredFeb 8, 2016 at 19:14
mrry's user avatar

Comments

Your Answer

Sign up orlog in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

By clicking “Post Your Answer”, you agree to ourterms of service and acknowledge you have read ourprivacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.