遇到情况:上一秒程序运行正常,下一秒程序某个module has no attribute ,而你除了建了一个新的空白文件,啥子也木有干。eg:
AttributeError: module 'tensorflow' has no attribute 'reset_default_graph'
or
AttributeError: module 'tensorflow' has no attribute 'Session'
and some others
可能原因:你新建的文件名字和已有的依赖包名字冲突了
解决:直接删除或rename 文件就好了哈。