Closed JeelRajodiya closed 3 years ago
This is probably due to running buildozer from sudo, see the documentation on how to run buildozer: https://buildozer.readthedocs.io/en/latest/quickstart.html
As a concequence there may be root owned files that a user level Buildozer can't update, so delete project/.buildozer which should address this (all cases?). You can delete /root/.buildozer too as that is an artifact of the sudo.
Usage questions are best directed here https://groups.google.com/forum/?oldui=1#!forum/kivy-users
@RobertFlatt What I did: copied the .buildozer folder to username folder and then deleted the .buildozer folder from root and run the command with outsudo now I'm getting this Error:
Ensure build layout
Check configuration tokens
Read available permissions from api-versions.xml
Preparing build
Check requirements for android
Run 'dpkg --version'
Cwd None
Debian 'dpkg' package management program version 1.19.7 (amd64).
This is free software; see the GNU General Public License version 2 or
later for copying conditions. There is NO warranty.
Search for Git (git)
-> found at /usr/bin/git
Search for Cython (cython)
-> found at /usr/bin/cython
Search for Java compiler (javac)
-> found at /usr/lib/jvm/java-11-openjdk-amd64/bin/javac
Search for Java keytool (keytool)
-> found at /usr/lib/jvm/java-11-openjdk-amd64/bin/keytool
Install platform
Run 'git config --get remote.origin.url'
Cwd /mnt/c/Users/ZEEL/Documents/languages/python/Projects/Android_app/.buildozer/android/platform/python-for-android
https://github.com/kivy/python-for-android.git
Run 'git branch -vv'
Cwd /mnt/c/Users/ZEEL/Documents/languages/python/Projects/Android_app/.buildozer/android/platform/python-for-android
* master 1b3b0e3f [origin/master] Merge pull request #2225 from kivy/release-2020.06.02
Run '/usr/bin/python3.6 -m pip install -q --user \'appdirs\' \'colorama>=0.3.3\' \'jinja2\' \'six\' \'enum34; python_version<"3.4"\' \'sh>=1.10; sys_platform!="nt"\' \'pep517<0.7.0"\' \'toml\''
Cwd None
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/lib/python3/dist-packages/pip/__main__.py", line 16, in <module>
from pip._internal.cli.main import main as _main # isort:skip # noqa
File "/usr/lib/python3/dist-packages/pip/_internal/cli/main.py", line 10, in <module>
from pip._internal.cli.autocompletion import autocomplete
File "/usr/lib/python3/dist-packages/pip/_internal/cli/autocompletion.py", line 9, in <module>
from pip._internal.cli.main_parser import create_main_parser
File "/usr/lib/python3/dist-packages/pip/_internal/cli/main_parser.py", line 7, in <module>
from pip._internal.cli import cmdoptions
File "/usr/lib/python3/dist-packages/pip/_internal/cli/cmdoptions.py", line 24, in <module>
from pip._internal.exceptions import CommandError
File "/usr/lib/python3/dist-packages/pip/_internal/exceptions.py", line 10, in <module>
from pip._vendor.six import iteritems
File "/usr/lib/python3/dist-packages/pip/_vendor/__init__.py", line 79, in <module>
vendored("pkg_resources")
File "/usr/lib/python3/dist-packages/pip/_vendor/__init__.py", line 36, in vendored
__import__(modulename, globals(), locals(), level=0)
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 3251, in <module>
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 3235, in _call_aside
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 3264, in _initialize_master_working_set
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 574, in _build_master
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 567, in __init__
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 623, in add_entry
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2065, in find_on_path
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 2127, in distributions_from_metadata
PermissionError: [Errno 13] Permission denied: '/usr/lib/python3.6/virtualenv-20.0.29.dist-info'
Command failed: /usr/bin/python3.6 -m pip install -q --user 'appdirs' 'colorama>=0.3.3' 'jinja2' 'six' 'enum34; python_version<"3.4"' 'sh>=1.10; sys_platform!="nt"' 'pep517<0.7.0"' 'toml'
ENVIRONMENT:
SHELL = '/bin/bash'
WSL_DISTRO_NAME = 'Ubuntu-20.04'
NAME = 'Lenovo-P'
PWD = '/mnt/c/Users/ZEEL/Documents/languages/python/Projects/Android_app'
LOGNAME = 'jeel'
HOME = '/home/jeel'
LANG = 'C.UTF-8'
LS_COLORS = 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:'
LESSCLOSE = '/usr/bin/lesspipe %s %s'
TERM = 'xterm-256color'
LESSOPEN = '| /usr/bin/lesspipe %s'
USER = 'jeel'
SHLVL = '1'
WSLENV = ''
XDG_DATA_DIRS = '/usr/local/share:/usr/share:/var/lib/snapd/desktop'
PATH = ('/home/jeel/.buildozer/android/platform/apache-ant-1.9.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program '
'Files (x86)/Common '
'Files/Oracle/Java/javapath:/mnt/c/Users/ZEEL/AppData/Local/Programs/Python/Python38/:/mnt/c/Users/ZEEL/AppData/Local/Programs/Python/Python38/Scripts/:/mnt/c/Users/ZEEL/AppData/Local/Programs/Python/Python38-32/Scripts:/mnt/c/Users/ZEEL/AppData/Local/Programs/Python/Python38-32:/mnt/c/Users/ZEEL/AppData/Local/Programs/Python/pypy3.6-v7.3.1-win32:/mnt/c/Python27:/mnt/c/Python27/Scripts:/mnt/c/ProgramData/Oracle/Java/javapath:/mnt/c/Windows/System32:/mnt/c/ProgramData/chocolatey/bin:/mnt/c/Users/ZEEL/AppData/Local/Programs/Python/Python38-32:/mnt/c/Users/ZEEL/AppData/Local/Programs/Python/Python38-32/Scripts:/mnt/c/Program '
'Files/Java/jdk-13.0.1/bin:/mnt/c/Program '
'Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/bin:/mnt/d/apps/pypy/pypy3.6-v7.3.1-win32:/mnt/c/Program '
'Files/Git/cmd:/mnt/c/Users/ZEEL/AppData/Local/Programs/Python/Python38/:/mnt/c/Users/ZEEL/AppData/Local/Programs/Python/Python38/Scripts/:/mnt/c/Users/ZEEL/AppData/Local/Programs/Python/Python38-32/Scripts:/mnt/c/Users/ZEEL/AppData/Local/Programs/Python/Python38-32:/mnt/c/Users/ZEEL/AppData/Local/Programs/Python/pypy3.6-v7.3.1-win32:/mnt/c/Python27/Scripts:/mnt/c/Python27:/mnt/c/Users/ZEEL/AppData/Roaming/ActiveState/bin:/mnt/c/ProgramData/Oracle/Java/javapath:/mnt/c/Windows/System32:/mnt/c/Program '
'Files/nodejs/:/mnt/c/ProgramData/chocolatey/bin:/mnt/c/Program '
'Files/Java/jdk-13.0.1/bin:/mnt/c/Program '
'Files/Git:/mnt/c/Users/ZEEL/AppData/Local/Programs/Microsoft VS '
'Code/bin:/mnt/c/Program '
'Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/bin:/mnt/d/apps/pypy/pypy3.6-v7.3.1-win32:/snap/bin')
HOSTTYPE = 'x86_64'
_ = '/usr/bin/buildozer'
Buildozer failed to execute the last command
The error might be hidden in the log above this error
Please read the full log, and search for it before
raising an issue with buildozer itself.
In case of a bug report, please add a full log with log_level = 2```
What I did: copied the .buildozer folder to username folder a
Delete project/.buildozer ~/.buildozer ~/.cache/* ~/.gradle You need to recreate the .buildozer, not copy it.
PermissionError: [Errno 13] Permission denied: '/usr/lib/python3.6/virtualenv-20.0.29.dist-info'
I don't know the cause of this.
Update
PermissionError: [Errno 13] Permission denied: '/usr/lib/python3.6/virtualenv-20.0.29.dist-info'
I think this should be in user site packages, as ~/.local/lib/python3.6/site-packages/virtualenv-20.0.29.dist-info
See https://virtualenv.pypa.io/en/latest/installation.html#via-pip
I expect the file could only have got into the /usr/lib/... root owned directectory by over use of root privileges.
The solution is to reverse whatever got it there, and install virtualenv following its instructions. And incase you are tempted, dont just copy or move it. ;)
Versions
Description
// REPLACE ME: converting .py to .apk
buildozer.spec
Command:
Spec file:
Logs