LoginSignup
1
0

More than 5 years have passed since last update.

KeyError: "Couldn't find enum google.protobuf.MethodOptions.IdempotencyLevel"

Posted at

Tensorflowをupgradeしようとして公式の通りに

pip install --upgrade (osなどの指定)

として

import tensorflow as tf

としたら

KeyError: "Couldn't find enum google.protobuf.MethodOptions.IdempotencyLevel"

というエラーが出たのでその時の対処法をまとめてみた。

とりあえずtensorflowを一回uninstallしてみる。

pip uninstall tensorflow

でまたinstall

pip install tensorflow

この時にまた

import tensorflow as tf

とすると

Successfully installed tensorflow-(最新のversion)

とでたがエラー文は変わらず...

エラー文をみてみると、何やらprotobufというものが悪さをしているみたい。
protobufの説明は省きます。

とりあえず再インストールしてみる。

pip uninstall protobuf
pip install protobuf

そしたらエラーが消えました!

FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters

このようなWarningが出たがとりあえず今の所問題はないのでこのエラー解消は後々...

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0