Android Market API - Python ImportError:没有名为 google.protobuf 的模块
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18969358/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Android Market API - Python ImportError: No module named google.protobuf
提问by Siddharthan Asokan
Based on Python-APIthe requirements I have configured and installed the protocol buffers (as mentioned in http://worthynote.blogspot.com/2011/05/protobuf-compiler-on-mac.html) and python 2.7. When I ran the command
基于Python-API,我已经配置并安装了协议缓冲区(如http://worthynote.blogspot.com/2011/05/protobuf-compiler-on-mac.html 中所述)和 python 2.7 的要求。当我运行命令时
python examples.py
and still faced the error:
并且仍然面临错误:
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
Any idea whats going wrong here?
知道这里出了什么问题吗?
采纳答案by Yusuf X
回答by saneryee
Use conda, if you use anaconda and juypter
使用 conda,如果您使用 anaconda 和 juypter
conda install -c conda-forge protobuf=3.2.0