This is the error I received. I am using Ubuntu 24.04, and I have a simple Kivy app which includes a main.py file and my.kv file. I have the buildozer.spec file too, but when I need to get the APK File, the following error pops up.
ish@ish-VirtualBox:~/kivyproject$ buildozer -v android debug# Ensure build layout# Create directory /home/ish/kivyproject/bin# Check configuration tokens# Preparing build# Check requirements for android# Search for Git (git)# -> found at /usr/bin/git# Search for Cython (cython)# -> found at /usr/local/bin/cython# Search for Java compiler (javac)# -> found at /usr/bin/javac# Search for Java keytool (keytool)# -> found at /usr/bin/keytool# Install platform# Run 'git config --get remote.origin.url' ...# Cwd /home/ish/kivyproject/.buildozer/android/platform/python-for-androidhttps://github.com/kivy/python-for-android.git# Run 'git branch -vv' ...# Cwd /home/ish/kivyproject/.buildozer/android/platform/python-for-android* master 957a3e5f [origin/master] Merge pull request #2959 from kivy/release-2024.01.21# Run '/usr/bin/python3 -m pip install -q --user appdirs colorama>=0.3.3 jinja2 sh>=1.10, <2.0; sys_platform!="win32" build toml packaging setuptools' ...# Cwd Noneerror: externally-managed-environment× This environment is externally managed╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install. If you wish to install a non-Debian-packaged Python package, create a virtual environment using python3 -m venv path/to/venv. Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make sure you have python3-full installed. If you wish to install a non-Debian packaged Python application, it may be easiest to use pipx install xyz, which will manage a virtual environment for you. Make sure you have pipx installed. See /usr/share/doc/python3.12/README.venv for more information.note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.hint: See PEP 668 for the detailed specification.# Command failed: ('/usr/bin/python3', '-m', 'pip', 'install', '-q', '--user', 'appdirs', 'colorama>=0.3.3', 'jinja2', 'sh>=1.10, <2.0; sys_platform!="win32"', 'build', 'toml', 'packaging', 'setuptools')# Error code: 1# ENVIRONMENT:# SHELL = '/bin/bash'# SESSION_MANAGER = 'local/ish-VirtualBox:@/tmp/.ICE-unix/2059,unix/ish-VirtualBox:/tmp/.ICE-unix/2059'# QT_ACCESSIBILITY = '1'# COLORTERM = 'truecolor'# XDG_CONFIG_DIRS = '/etc/xdg/xdg-ubuntu:/etc/xdg'# XDG_MENU_PREFIX = 'gnome-'# GNOME_DESKTOP_SESSION_ID = 'this-is-deprecated'# GNOME_SHELL_SESSION_MODE = 'ubuntu'# SSH_AUTH_SOCK = '/run/user/1000/keyring/ssh'# MEMORY_PRESSURE_WRITE = 'c29tZSAyMDAwMDAgMjAwMDAwMAA='# XMODIFIERS = '@im=ibus'# DESKTOP_SESSION = 'ubuntu'# GTK_MODULES = 'gail:atk-bridge'# DBUS_STARTER_BUS_TYPE = 'session'# PWD = '/home/ish/kivyproject'# LOGNAME = 'ish'# XDG_SESSION_DESKTOP = 'ubuntu'# XDG_SESSION_TYPE = 'wayland'# SYSTEMD_EXEC_PID = '2059'# XAUTHORITY = '/run/user/1000/.mutter-Xwaylandauth.P7LQP2'# HOME = '/home/ish'# USERNAME = 'ish'# IM_CONFIG_PHASE = '1'# LANG = 'en_US.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=00: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:*.avif=01;35:*.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:*.webp=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:*~=00;90:*#=00;90:*.bak=00;90:*.crdownload=00;90:*.dpkg-dist=00;90:*.dpkg-new=00;90:*.dpkg-old=00;90:*.dpkg-tmp=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:*.swp=00;90:*.tmp=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:'# XDG_CURRENT_DESKTOP = 'ubuntu:GNOME'# MEMORY_PRESSURE_WATCH = '/sys/fs/cgroup/user.slice/user-1000.slice/user@1000.service/app.slice/app-gnome\\x2dsession\\x2dmanager.slice/gnome-session-manager@ubuntu.service/memory.pressure'# VTE_VERSION = '7600'# WAYLAND_DISPLAY = 'wayland-0'# GNOME_TERMINAL_SCREEN = '/org/gnome/Terminal/screen/6009e977_7532_431a_acea_9dd366fa6227'# GNOME_SETUP_DISPLAY = ':1'# LESSCLOSE = '/usr/bin/lesspipe %s %s'# XDG_SESSION_CLASS = 'user'# TERM = 'xterm-256color'# LESSOPEN = '| /usr/bin/lesspipe %s'# USER = 'ish'# GNOME_TERMINAL_SERVICE = ':1.105'# DISPLAY = ':0'# SHLVL = '1'# GSM_SKIP_SSH_AGENT_WORKAROUND = 'true'# QT_IM_MODULE = 'ibus'# DBUS_STARTER_ADDRESS = 'unix:path=/run/user/1000/bus,guid=0a88ef8a0bb0368fc5548f4f6673fcd1'# XDG_RUNTIME_DIR = '/run/user/1000'# DEBUGINFOD_URLS = 'https://debuginfod.ubuntu.com '# XDG_DATA_DIRS = '/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop'# PATH = '/home/ish/.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:/snap/bin:/snap/bin:/home/ish/.local/bin/'# GDMSESSION = 'ubuntu'# DBUS_SESSION_BUS_ADDRESS = 'unix:path=/run/user/1000/bus,guid=0a88ef8a0bb0368fc5548f4f6673fcd1'# _ = '/usr/local/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
I have been trying to fix this problem since 8am in the morning and its 3pm now so yeah, safe to say I tried a lot. I tried a lot of different and unique methods, but I still end up with the same problem. I tried using Ubuntu, Google Colab and GitHub to solve this problem, yet I end up with the same error every time.
This is my first Stack Overflow Question, so feel free to tell me to add any information if necessary.
Thank You.