解决 No module named ‘tensorflow.examples.tutorials’
在使用tensorflow导入mnist时,出现以下报错信息:
ModuleNotFoundError:no moudle named ‘tensorflow.examples.tutorials’
该报错是因为tensorflow里面没有tutorials文件
通过
pip show tensorflow
找到tensorflow所在的位置,比如我的在这个路径下
/anaconda3/lib/python3.6/site-packages/tensorflow_core/examples
接着将tutorials文件通过ftp传输到该目录下
然后输入
import tensorflow
from tensorflow.examples.tutorials.mnist import input_data
这个时候就不会再报错。问题解决。
tutorials文件点击这里获取链接:https://pan.baidu.com/s/1qkhbxYrqnYu988CQeZorlw
提取码:hhz7。