I was trying to compile a .proto using the command: protoc --plugin=protoc-gen-nanopb=nanopb/generator/protoc-gen-nanopb, it gives me the following error (I manually installed protobuf3). Any idea what might went wrong?
Traceback (most recent call last):
File "/usr/local/google/home/yihuaz/nanopb/generator/nanopb_generator.py", line 33, in <module>
import proto.nanopb_pb2 as nanopb_pb2
ImportError: No module named nanopb_pb2
--nanopb_out: protoc-gen-nanopb: Plugin failed with status code 1.
Best,
Yihua
Thanks Petteri for your quick response. After running make in the generator/proto, I tried to run the protoc command again, and now got the following error
Traceback (most recent call last):
File "/usr/local/google/home/yihuaz/nanopb/generator/nanopb_generator.py", line 21, in <module>
import google.protobuf.text_format as text_format
File "/usr/local/lib/python2.7/dist-packages/protobuf-3.2.0-py2.7.egg/google/__init__.py", line 2, in <module>
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3036, in <module>
@_call_aside
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3020, in _call_aside
f(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3064, in _initialize_master_working_set
for dist in working_set
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3064, in <genexpr>
for dist in working_set
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2592, in activate
for pkg in self._get_metadata('namespace_packages.txt'):
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2582, in _get_metadata
for line in self.get_metadata_lines(name):
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1472, in get_metadata_lines
return yield_lines(self.get_metadata(name))
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1468, in get_metadata
value = self._get(self._fn(self.egg_info, name))
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1577, in _get
with open(path, 'rb') as stream:
IOError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/protobuf-3.2.0-py2.7.egg/EGG-INFO/namespace_packages.txt'
--nanopb_out: protoc-gen-nanopb: Plugin failed with status code 1.
Do you have an idea on this?
--
You received this message because you are subscribed to a topic in the Google Groups "nanopb" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/nanopb/SVGAvxsJsrw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to nanopb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Petteri