【发布时间】:2017-03-16 06:22:44
【问题描述】:
我正在关注教程https://www.tensorflow.org/install/install_windows,但是当我尝试导入tensorflow时,它会出现错误:
回溯(最近一次通话最后一次):
文件“”,第 1 行,在 将张量流导入为 tf
中的文件“D:\Python 3.5.3\lib\site-packages\tensorflow__init__.py”,第 51 行 德尔核心
NameError: name 'core' 没有定义
tensorflow安装命令是
pip3 install --upgrade tensorflow
完整代码在这里 >
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))
顺便说一下python版本是3.5.3
有什么办法可以解决这个问题吗?提前致谢。
【问题讨论】:
-
你能粘贴你的命令来安装 TensorFlow 吗?
-
我正在关注Tensorflow官网发布的教程,链接在这里tensorflow.org/install/install_windows。我使用的命令是:pip3 install --upgrade tensorflow
-
你能发布完整的代码吗?
-
我只是在本网站tensorflow.org/install/install_windows 的“验证您的安装”部分之后验证安装。完整代码在这里: import tensorflow as tf hello = tf.constant('Hello, TensorFlow!') sess = tf.Session() print(sess.run(hello)) 它是从上面发布的链接中复制的。
-
我发现 TensorFlow 仅适用于 Python 3.5.x。不适用于 Python 3.6。你确定安装TensorFlow成功了吗?
标签: tensorflow