tensorflow 报错: AttributeError: module 'tensorflow' has no attribute 'xxxx'
2017-11-09 10:02
1206 查看
____tz_zs
用的好好的 tensorflow 突然出现:能导入tensorflow 包,但是使用任何 tensorflow 下的模块都报“不存在”的错误。
如:使用 tf.Variable 创建一个变量也会报 AttributeError: module 'tensorflow' has no attribute 'Variable '。
原因是 tensorflow 变成了一个没有任何内容的模块(导致 tensorflow 变为空的原因未知)
解决办法:卸载 tensorflow (根据你所安装的 pip uninstall tensorflow 或者 pip uninstall tensorflow-gpu)然后重新安装(根据你所安装的 pip install tensorflow 或者 pip install tensorflow-gpu)
ps:根据谷歌查询到的一些讨论信息,windows 下安装 tensorflow 时也曾出现过安装得到的 tensorflow 为空的现象,可能是因为权限问题。
附:
Windows下TensorFlow的安装:http://blog.csdn.net/tz_zs/article/details/74779953
github 类似问题的讨论:https://github.com/tensorflow/tensorflow/issues/7285
用的好好的 tensorflow 突然出现:能导入tensorflow 包,但是使用任何 tensorflow 下的模块都报“不存在”的错误。
如:使用 tf.Variable 创建一个变量也会报 AttributeError: module 'tensorflow' has no attribute 'Variable '。
原因是 tensorflow 变成了一个没有任何内容的模块(导致 tensorflow 变为空的原因未知)
解决办法:卸载 tensorflow (根据你所安装的 pip uninstall tensorflow 或者 pip uninstall tensorflow-gpu)然后重新安装(根据你所安装的 pip install tensorflow 或者 pip install tensorflow-gpu)
ps:根据谷歌查询到的一些讨论信息,windows 下安装 tensorflow 时也曾出现过安装得到的 tensorflow 为空的现象,可能是因为权限问题。
附:
Windows下TensorFlow的安装:http://blog.csdn.net/tz_zs/article/details/74779953
github 类似问题的讨论:https://github.com/tensorflow/tensorflow/issues/7285
相关文章推荐
- 【tensorflow_error】'module' has no attribute 'select'
- tensorflow报错:AttributeError: module 'tensorflow' has no attribute 'feature_column'
- TensorFlow Bug AttributeError: module 'tensorflow' has no attribute 'unpack'
- tensorflow :AttributeError: 'module' object has no attribute 'computation'
- Tensorflow:Attribute Error: 'module' object has no attribute 'mul'
- 【Tensorflow】报错:AttributeError: 'module' object has no attribute 'scalar_summary'
- Python AttributeError: 'module' object has no attribute xxxx
- 【tensorflow_error】'module' has no attribute 'select'
- Tensorflow:Attribute Error: 'module' object has no attribute ‘summary'
- tensorflow1.0后有AttributeError: ‘module’ object has no attribute 'xx'
- tensorflow 报错 AttributeError: 'module' object has no attribute 'computation'
- 【python学习笔记(2)】脚本报错"AttributeError: 'module' object has no attribute 'xxx'"解决方法
- 【TensorFlow问题】AttributeError:'module' object has no attribute 'mul'
- AttributeError: module 'numpy' has no attribute 'dtype' 问题
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
- Ubuntu16.04上启动Spyder出现错误AttributeError: 'module' object has no attribute '_base'
- 对于AttributeError: ‘module’ object has no attribute ‘AF_INET’ 的错误原因
- python运行不了 AttributeError: module object has no attribute getdefaultlocale
- Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法
- AttributeError: module object has no attribute “Series”. Code works in Python