关于import tensorflow as tf的错误:AttributeError: type object 'NewBase' has no attribute 'is_abstract'
2018-03-31 23:20
2126 查看
第一步:你需要查看你的six版本,
import six
print(six.__version__)
如果是1.5的版本,你就需要更新你的版本
pip3 install six --upgrade
如果提示已经是最新或者显示python-Not uninstalling six at /usr/lib/python3/dist-packages, owned by OS
此时你需要进入到/usr/lib/python3/dist-packages中去删除six.egg.info这个文件(就是.info,这个名字可能不完整),然后就可以删除six了
pip3 uninstall six
之后自己手动的安装six
pip3 install six 会提示安装的版本是10以上的,然后你再在python3的命令行中查看six版本是之前的版本,这时你去/usr/bin/python3/dist-packages中删除掉six.py,你在查看six的版本就是你安装的版本了,import tensorflow as tf命令就可以正常运行了。
import six
print(six.__version__)
如果是1.5的版本,你就需要更新你的版本
pip3 install six --upgrade
如果提示已经是最新或者显示python-Not uninstalling six at /usr/lib/python3/dist-packages, owned by OS
此时你需要进入到/usr/lib/python3/dist-packages中去删除six.egg.info这个文件(就是.info,这个名字可能不完整),然后就可以删除six了
pip3 uninstall six
之后自己手动的安装six
pip3 install six 会提示安装的版本是10以上的,然后你再在python3的命令行中查看six版本是之前的版本,这时你去/usr/bin/python3/dist-packages中删除掉six.py,你在查看six的版本就是你安装的版本了,import tensorflow as tf命令就可以正常运行了。
相关文章推荐
- TensorFlow1.0 运行报错 AttributeError: type object 'NewBase' has no attribute 'is_abstract'
- windows tensorflow AttributeError: 'NoneType' object has no attribute 'bucketize'
- python 提示错误AttributeError: type object 'str' has no attribute '_name_'
- TensorBoard tf.summary.merge_all() AttributeError: 'NoneType' object has no attribute 'bucket 错误
- tensorflow AttributeError: 'module' object has no attribute 'cpu_count'
- python机器学习实战3.2提示错误AttributeError: type object 'str' has no attribute '_name_'
- python 编译错误TypeError: 'builtin_function_or_method' object has no attribute '__getitem__'
- tensorflow AttributeError: 'module' object has no attribute 'cpu_count'
- Tensorflow protobuf版本报错问题解决(AttributeError: 'module' object has no attribute 'Default')
- AttributeError: module 'tensorflow.python.platform.flags' has no attribute 'mark_flag_as_required'
- 关于Srapy框架运行的错误AttributeError: 'module' object has no attribute 'OP_NO_TLSv1_1'
- TypeError: object of type 'zip' has no len()、'zip' object is not subscriptable
- 【问题】Keras AttributeError: 'Tensor' object has no attribute '_keras_history'
- scapy AttributeError: 'NoneType' object has no attribute 'route'解决办法
- Ubuntu16.04上启动Spyder出现错误AttributeError: 'module' object has no attribute '_base'
- 使用Buildozer部署时,出现AttributeError: 'NoneType' object has no attribute 'group'错误的解决
- import tensorflow.contrib.slim as slim ImportError: No module named slim
- 【Python错误】AttributeError: 'bool' object has no attribute '__call__'
- python:TypeError: 'coo_matrix' object has no attribute '__getitem__'
- ImportError: ‘module’ object has no attribute 'check_spec...'