If you cannot immediately regenerate your protos, some other possible workarounds are:

  1. Downgrade the protobuf package to 3.20.x or lower.
  2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python

这是由于安装tensorflow的时候,安装依赖包protobuf的版本过高造成的。
卸掉后再重新装一个指定版本的就行了。

pip uninstall protobuf
pip install protobuf==3.19.0