I'm following the tutorial at https://developers.google.com/protocol-buffers/docs/pythontutorial .
I've managed to create the addressbook_pb2.py
from the proto file. I added addressbook_pb2.py
to my project, and when I do import addressbook_pb2
the .py file pops up as I type the name, so I know the program recognizes it.
When I try to run the program, which consists of only the line import addressbook_pb2
, I receive the error No module named 'google'
. I am extremely new to Python, how would I go about fixing this error? I am running Python 3.4 in Visual Studio 2013
The error is caused at each importing google.protobuf
line in my 'addressbook_pb2.py' file
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: addressbook.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf import descriptor_pb2