Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Market API - Python ImportError: No module named google.protobuf

Based on Python-API the 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 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?

like image 348
Siddharthan Asokan Avatar asked Sep 23 '13 21:09

Siddharthan Asokan


2 Answers

Use pip:

sudo pip install protobuf

I had the same problem, which is how I found your question, and this fixed it.

like image 171
Yusuf X Avatar answered Nov 02 '22 06:11

Yusuf X


Use conda, if you use anaconda and juypter

conda install -c conda-forge protobuf=3.2.0
like image 2
saneryee Avatar answered Nov 02 '22 06:11

saneryee