基于Python-API我已配置并安装协议缓冲区(如http://worthynote.blogspot.com/2011/05/protobuf-compiler-on-mac.html)和python 2.7中所述的要求。当我运行命令时
python examples.py
仍然面临错误:
File "examples.py", line 3, in <module>
import market_proto
File "/Users/siddharthan64/Downloads/android-market-api-py-master/market_proto.py", line 3, in <module>
from google.protobuf import descriptor
ImportError: No module named google.protobuf
有什么想法在这里出错吗?
答案 0 :(得分:44)
答案 1 :(得分:1)
如果您使用anaconda和juypter
,请使用condaconda install -c conda-forge protobuf=3.2.0