The essence of the problem:
When compiling python code:
#!/usr/bin/env python # -*- coding: utf-8 -*- import socket import message_pb2 import sys sock = socket.socket() sock.connect(('localhost', 8080)) Request = message_pb2.request() Request.a=1 Request.b=2 Request.c=3 for i in [1,2,3]: a = int (input()) sock.send(Request) Gives an error message
Traceback (most recent call last): File "D:\protobuf\client.py", line 5, in <module> import message_pb2 File "D:\protobuf\message_pb2.py", line 6, in <module> from google.protobuf import descriptor as _descriptor ImportError: No module named google.protobuf What could be the problem? The protobuff file with the structure was successfully compiled and lies in the folder with the file (where the client.py code client.py )
Thank you in advance
protobufpackageprotobuf? - awesoon