TL; DR erhält ImportError: cannot import name pywrap_tensorflow
bei der Verwendung von TensorFlow auf El Capitan.Tensorflow ImportError unter OS X
Details: Ich befolgte die TensorFlow-Installationsanweisungen für Mac OS X von here.
Mac OS X, CPU nur, Python 2.7:$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/tensorflow-0.9.0rc0-py2-none-any.whl $ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/tensorflow-0.9.0rc0-py2-none-any.whl $ sudo pip install --upgrade $TF_BINARY_URL
Diese Schritte waren erfolgreich.
Also versuchen wir es:
22:54:00/tensorflow $ipython
Python 2.7.11 (default, Jan 22 2016, 08:29:18)
Type "copyright", "credits" or "license" for more information.
IPython 4.2.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
[TerminalIPythonApp] WARNING | File not found: '/shared/.pythonstartup'
In [1]: import tensorflow as tf
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-41389fad42b5> in <module>()
----> 1 import tensorflow as tf
/git/tensorflow/tensorflow/__init__.py in <module>()
21 from __future__ import print_function
22
---> 23 from tensorflow.python import *
/git/tensorflow/tensorflow/python/__init__.py in <module>()
46 _default_dlopen_flags = sys.getdlopenflags()
47 sys.setdlopenflags(_default_dlopen_flags | ctypes.RTLD_GLOBAL)
---> 48 from tensorflow.python import pywrap_tensorflow
49 sys.setdlopenflags(_default_dlopen_flags)
50
ImportError: cannot import name pywrap_tensorflow
https://github.com/tensorflow/tensorflow/issues/3217 –