python3导入tensorflow时import tensorflow报错如下:
ImportError: cannot import name ‘abs’
原因:
protobuf和tensorflow发生了冲突
解决方法:
删除tensorflow所有模块(包括-gpu)
pip uninstall tensorflow
1
删除protobuf
pip uninstall protobuf
1
重新安装tensorflow
pip install tensorflow==1.8.0
1
Reference:
https://stackoverflow.com/questions/51299194/importerror-cannot-import-name-abs