雑多な技術系メモ

自分用のメモ。内容は保証しません。よろしくお願いします。

tensorflow で出たエラー( from google.protobuf import descriptor as _descriptor ImportError: cannot import name 'descriptor')の対処法

tensorflowで、以下のようなエラーが出た。その時の対処法をメモしておく

環境

ubuntu 16.04

python 3.5.1

エラー内容(一部)

省略

from google.protobuf import descriptor as _descriptor ImportError: cannot import name 'descriptor'

対処法

tensorflowとprotobufをuninstall して、tensorflowを再installしたら治った

pip uninstall tensorflow  
pip uninstall protobuf  
pip install --upgrade tensorflow