2017-03-16 6 views
0

ich nach dem turtorial https://www.tensorflow.org/install/install_windows, aber wenn ich versuche, tensorflow zu importieren, kommt es mit einem Fehler:Nameerror: name ‚Kern‘ ist nicht definiert

Traceback (most recent call last):
File "", line 1, in import tensorflow as tf
File "D:\Python 3.5.3\lib\site-packages\tensorflow__init__.py", line 51, in
del core
NameError: name 'core' is not defined

Der tensorflow Installationsbefehl

pip3 install --upgrade tensorflow

ist

Der vollständige Code ist hier >

import tensorflow as tf 
hello = tf.constant('Hello, TensorFlow!')  
sess = tf.Session()     
print(sess.run(hello)) 

Die python-Version i s 3.5.3 nebenbei

Gibt es eine Möglichkeit, dieses Problem zu lösen? Danke im Voraus.

+0

Können Sie Ihren Befehl einfügen, um TensorFlow zu installieren? – vanloc

+0

Ich folge dem Tutorial von Tensorflow offiziellen Website, der Link ist hier https://www.tensorflow.org/install/install_windows. Der Befehl, den ich verwendet habe, ist: pip3 install --upgrade tensorflow –

+0

Können Sie vollständigen Code posten? – vanloc

Antwort

1

Ich habe dieses Problem gelöst durch Deaktivieren die Option 'Precompile Standard-Bibliothek' bei der Installation von Python.

Verwandte Themen