I got started to use protobuf in Python , after installed google.protobuf compiler.
$ yum install protobuf-compiler
Problem
Traceback (most recent call last):
File "test_proto.py", line 1, in <module>
import test_simple_service_pb2
File "/app/build_py3/test_simple_service_pb2.py", line 6, in <module>
from google.protobuf import descriptor as _descriptor
ModuleNotFoundError: No module named 'google'
Solution
If you’re using pip3.
$ pip3 install protobuf
Pip2
$ pip install protobuf
If you like this post, you can buy me a coffee! :)