googleplay-api
googleplay-api copied to clipboard
Can build "Exception: You should install protobuf compiler"
i cant figure out why its saying protobuf is not installed
$ python setup.py build
running build
running build_py
Traceback (most recent call last):
File "setup.py", line 48, in <module>
'requests'])
File "C:\Users\<username>\AppData\Local\Programs\Python\Python37\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "C:\Users\<username>\AppData\Local\Programs\Python\Python37\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\<username>\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\<username>\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\<username>\AppData\Local\Programs\Python\Python37\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\<username>\AppData\Local\Programs\Python\Python37\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\<username>\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "setup.py", line 19, in run
raise Exception("You should install protobuf compiler")
Exception: You should install protobuf compiler
$ pip3 list
Package Version
----------------- ---------
asn1crypto 1.0.1
bleach 2.1
cachetools 3.1.1
certifi 2019.9.11
cffi 1.12.3
chardet 3.0.4
click 6.7
colorama 0.3.3
cryptography 2.7
entrypoints 0.3
grpcio 1.18.0
grpcio-tools 1.18.0
html5lib 1.0.1
httplib2 0.14.0
idna 2.8
keyring 19.2.0
lxml 4.4.1
pip 20.0.2
protobuf 3.11.3
protobuf-compiler 1.0.20
pyasn1 0.4.7
pyasn1-modules 0.2.7
pyaxmlparser 0.3.21
pycparser 2.19
pywin32-ctypes 0.2.0
requests 2.22.0
rsa 4.0
setuptools 40.8.0
six 1.12.0
termcolor 1.1.0
tqdm 4.31.1
uritemplate 3.0.0
urllib3 1.25.6
webencodings 0.5.1
$ python -m site
sys.path = [
'C:\\CODE\\github\\googleplay-api',
'C:\\Users\\<username>\\AppData\\Local\\Programs\\Python\\Python37\\python37.zip',
'C:\\Users\\<username>\\AppData\\Local\\Programs\\Python\\Python37\\DLLs',
'C:\\Users\\<username>\\AppData\\Local\\Programs\\Python\\Python37\\lib',
'C:\\Users\\<username>\\AppData\\Local\\Programs\\Python\\Python37',
'C:\\Users\\<username>\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages',
'C:\\Users\\<username>\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\pyaxmlparser-0.3.21-py3.7.egg',
'C:\\Users\\<username>\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\lxml-4.4.1-py3.7-win-amd64.egg',
'C:\\Users\\<username>\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\click-6.7-py3.7.egg',
'C:\\Users\\<username>\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\requests-2.22.0-py3.7.egg',
'C:\\Users\\<username>\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\cryptography-2.7-py3.7-win-amd64.egg',
'C:\\Users\\<username>\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\urllib3-1.25.6-py3.7.egg',
'C:\\Users\\<username>\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\idna-2.8-py3.7.egg',
'C:\\Users\\<username>\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\chardet-3.0.4-py3.7.egg',
'C:\\Users\\<username>\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\certifi-2019.9.11-py3.7.egg',
'C:\\Users\\<username>\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\six-1.12.0-py3.7.egg',
'C:\\Users\\<username>\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\cffi-1.12.3-py3.7-win-amd64.egg',
'C:\\Users\\<username>\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\asn1crypto-1.0.1-py3.7.egg',
'C:\\Users\\<username>\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\pycparser-2.19-py3.7.egg',
'C:\\Users\\<username>\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\uritemplate-3.0.0-py3.7.egg',
'C:\\Users\\<username>\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\httplib2-0.14.0-py3.7.egg',
'C:\\Users\\<username>\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\rsa-4.0-py3.7.egg',
'C:\\Users\\<username>\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\pyasn1_modules-0.2.7-py3.7.egg',
'C:\\Users\\<username>\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\cachetools-3.1.1-py3.7.egg',
'C:\\Users\\<username>\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages\\pyasn1-0.4.7-py3.7.egg',
]
USER_BASE: 'C:\\Users\\<username>\\AppData\\Roaming\\Python' (doesn't exist)
USER_SITE: 'C:\\Users\\<username>\\AppData\\Roaming\\Python\\Python37\\site-packages' (doesn't exist)
ENABLE_USER_SITE: True
python --version
Python 3.7.4
python
>>> import shutil
>>> import os.path
>>> import subprocess
>>> import shutil
>>> PROTOC_EXEC = "protoc"
>>> shutil.which(PROTOC_EXEC)
>>> exec_path = shutil.which(PROTOC_EXEC)
>>> print(exec_path)
None
you must install protobuf-compiler, the executable, with apt install protobuf-compiler on Ubuntu or Debian.
I tried installing protoc this way (accepted answer):
https://askubuntu.com/questions/1072683/how-can-i-install-protoc-on-ubuntu-16-04
what about windows? we have no apt
https://raw.githubusercontent.com/NoMore201/googleplay-api/26f675c5a65101965b402ce5c911c08aac0d0b16/gpapi/googleplay_pb2.py