What Requirements to put in to Buildozer.spec file for Python/kivy app?

Viewed 1226

I am trying to export python/kivy app with buildozer to Android, but now i start to get this eror, I have installed Python 3.7.3 i can try the app from VScode. This are my imports from .py file:

    import os
    os.environ['KIVY_AUDIO'] = 'sdl2'
    from kivy.uix.textinput import TextInput
    from kivy.app import App
    from kivy.uix.button import Button
    from kivy.uix.label import Label
    from kivy.uix.image import Image
    from kivy.core.audio import SoundLoader
    from kivy.core.window import Window
    from kivy.clock import Clock
    from kivy.lang import Builder
    from kivy.uix.screenmanager import ScreenManager, Screen, FadeTransition
    import mysql.connector  # pip install mysql-connector-python
    from mysql.connector.errors import Error
    from kivy.uix.floatlayout import FloatLayout
    import kivy.properties as kyprops
    from kivy.uix.popup import Popup

What else should i set in Buildozer.spec if i have now this: whole buildozer.spec

# (list) Application requirements
# comma separated e.g. requirements = sqlite3,kivy
requirements = python3,kivy,mysql-connector-python

I must believe I installed all packages already, I installed them in Virtual and outside of Virtual environment. i added PATHS too, as it was showed in guides. Before I was getting SSL/TSL error, I am not sure now if I fixed it or I broke it and it stoped before it :P

when i try to export it i get this:

    [INFO]:     - copy /home/nahaku/PythonProjects/.tracking/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/android-build/build/lib.linux-arm-3.8/_sysconfigdata__linux_.pyc
[INFO]:    -> directory context /home/nahaku/PythonProjects/.tracking/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Lib
[INFO]:    Zip 571 files into the bundle
Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/nahaku/PythonProjects/.tracking/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1260, in <module>
    main()
  File "/home/nahaku/PythonProjects/.tracking/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main
    ToolchainCL()
  File "/home/nahaku/PythonProjects/.tracking/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 709, in __init__
    getattr(self, command)(args)
  File "/home/nahaku/PythonProjects/.tracking/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 154, in wrapper_func
    build_dist_from_args(ctx, dist, args)
  File "/home/nahaku/PythonProjects/.tracking/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 220, in build_dist_from_args
    ctx.bootstrap.assemble_distribution()
  File "/home/nahaku/PythonProjects/.tracking/.buildozer/android/platform/python-for-android/pythonforandroid/bootstraps/sdl2/__init__.py", line 44, in assemble_distribution
    join(self.dist_dir, python_bundle_dir), arch)
  File "/home/nahaku/PythonProjects/.tracking/.buildozer/android/platform/python-for-android/pythonforandroid/recipes/python3/__init__.py", line 376, in create_python_bundle
    shprint(sh.zip, stdlib_zip, *stdlib_filens)
  File "/home/nahaku/PythonProjects/.tracking/lib/python3.7/site-packages/sh.py", line 3581, in __getattr__
    return self.__env[name]
  File "/home/nahaku/PythonProjects/.tracking/lib/python3.7/site-packages/sh.py", line 3378, in __getitem__
    raise CommandNotFound(k)
sh.CommandNotFound: zip
# Command failed: /home/nahaku/PythonProjects/.tracking/bin/python -m pythonforandroid.toolchain create --dist_name=channelcheck --bootstrap=sdl2 --requirements=python3,kivy,mysql,mysql-connector-python --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/nahaku/PythonProjects/.tracking/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21
# ENVIRONMENT:
#     SHELL = '/bin/bash'
#     SESSION_MANAGER = 'local/nahaku:@/tmp/.ICE-unix/881,unix/nahaku:/tmp/.ICE-unix/881'
#     QT_ACCESSIBILITY = '1'
#     COLORTERM = 'truecolor'
#     XDG_CONFIG_DIRS = '/etc/xdg'
#     XDG_SESSION_PATH = '/org/freedesktop/DisplayManager/Session0'
#     XDG_MENU_PREFIX = 'xfce-'
#     TERM_PROGRAM_VERSION = '1.48.0'
#     GTK_IM_MODULE = 'ibus'
#     LANGUAGE = 'en_GB:en'
#     QT4_IM_MODULE = 'ibus'
#     SSH_AUTH_SOCK = '/tmp/ssh-4P22oWGtWvgG/agent.803'
#     XMODIFIERS = '@im=ibus'
#     DESKTOP_SESSION = 'lightdm-xsession'
#     SSH_AGENT_PID = '854'
#     GTK_MODULES = 'gail:atk-bridge'
#     XDG_SEAT = 'seat0'
#     PWD = '/home/nahaku/PythonProjects/.tracking'
#     XDG_SESSION_DESKTOP = 'lightdm-xsession'
#     LOGNAME = 'nahaku'
#     XDG_SESSION_TYPE = 'x11'
#     XAUTHORITY = '/home/nahaku/.Xauthority'
#     VSCODE_GIT_ASKPASS_NODE = '/usr/share/code/code'
#     XDG_GREETER_DATA_DIR = '/var/lib/lightdm/data/nahaku'
#     HOME = '/home/nahaku'
#     LANG = 'en_GB.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:'
#     XDG_CURRENT_DESKTOP = 'XFCE'
#     VIRTUAL_ENV = '/home/nahaku/PythonProjects/.tracking'
#     GIT_ASKPASS = '/usr/share/code/resources/app/extensions/git/dist/askpass.sh'
#     XDG_SEAT_PATH = '/org/freedesktop/DisplayManager/Seat0'
#     CHROME_DESKTOP = 'code-url-handler.desktop'
#     CLUTTER_IM_MODULE = 'ibus'
#     GLADE_CATALOG_PATH = ':'
#     XDG_SESSION_CLASS = 'user'
#     TERM = 'xterm-256color'
#     USER = 'nahaku'
#     VSCODE_GIT_IPC_HANDLE = '/run/user/1000/vscode-git-eea00ea7aa.sock'
#     DISPLAY = ':0.0'
#     SHLVL = '1'
#     QT_IM_MODULE = 'ibus'
#     XDG_VTNR = '7'
#     XDG_SESSION_ID = '2'
#     GLADE_MODULE_PATH = ':'
#     XDG_RUNTIME_DIR = '/run/user/1000'
#     GLADE_PIXMAP_PATH = ':'
#     PS1 = ('(.tracking) \\[\\e]0;\\u@\\h: '
 '\\w\\a\\]${debian_chroot:+($debian_chroot)}\\[\\033[01;32m\\]\\u@\\h\\[\\033[00m\\]:\\[\\033[01;34m\\]\\w\\[\\033[00m\\]\\$ ')
#     VSCODE_GIT_ASKPASS_MAIN = '/usr/share/code/resources/app/extensions/git/dist/askpass-main.js'
#     XDG_DATA_DIRS = '/usr/share/xfce4:/usr/local/share/:/usr/share/:/usr/share'
#     PATH = '/home/nahaku/.buildozer/android/platform/apache-ant-1.9.4/bin:/home/nahaku/PythonProjects/.tracking/bin:/home/nahaku/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games'
#     GDMSESSION = 'lightdm-xsession'
#     ORIGINAL_XDG_CURRENT_DESKTOP = 'XFCE'
#     DBUS_SESSION_BUS_ADDRESS = 'unix:path=/run/user/1000/bus'
#     TERM_PROGRAM = 'vscode'
#     _ = '/home/nahaku/PythonProjects/.tracking/bin/buildozer'
#     PACKAGES_PATH = '/home/nahaku/.buildozer/android/packages'
#     ANDROIDSDK = '/home/nahaku/.buildozer/android/platform/android-sdk'
#     ANDROIDNDK = '/opt/android-ndk-r21d'
#     ANDROIDAPI = '27'
#     ANDROIDMINAPI = '21'
# 
# 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

The whole error file here

0 Answers
Related