2017-05-05 193 views
0

我对这个错误很沮丧,我所做的是正从张量流教程中的代码导入湿润:导入错误:没有模块名为examples.tutorials.mnist

from tensorflow.examples.tutorials.mnist import input_data 
mnist = input_data.read_data_sets("MNIST_data/", one_hot=True) 

然而,当我运行蟒蛇表演:

文件 “/用户/ kevinling /桌面/机器学习/ tensorflow.py”,2号线,在 从tensorflow.examples.tutorials.mnist进口input_data 导入错误:没有模块examples.tutorials.mnist命名

当我检查到该目录中,该文件是完全有:

而目录是:

enter image description here

的input_data.py是这样的:

The input_data.py

+0

这驱使我疯狂 –

+0

可能的复制[进口输入\ _data MNIST tensorflow不工作(http://stackoverflow.com/questions/33664651/import-input-data-mnist-tensorflow-not-working ) – user2263572

+0

我在上面的帖子中尝试了所有这些方法,但都没有工作 –

回答

0

您是否已经安装tensorflow?如果没有,请他们install instructions或简单地安装使用PIP:

pip install tensorflow 

现在,确保你目前地方tensorflow所在的文件夹中,并尝试运行您的脚本。

python your_script.py 
+0

当然是安装了tensorflow,不工作 –

相关问题