ImportErrorを解決します:名前 'abs'インポートテンソルフローエラーをインポートできません



Resolve Importerror Cannot Import Nameabsimport Tensorflow Error



python3テンソルフローをインポートする場合import tensorflowエラーは次のとおりです。

ImportError: cannot import name 'abs'

理由:
protobuf with tensorflow競合が発生しました



解決:
tensorflowのすべてのモジュール(-gpuを含む)を削除します

pip uninstall tensorflow

protobufを削除する



pip uninstall protobuf

tensorflowを再インストールします

pip install tensorflow==1.8.0

参照:
https://stackoverflow.com/questions/51299194/importerror-cannot-import-name-abs