Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=myappMD --bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/content/.buildozer/android/platform/build-armeabi-v7a

1,414 views
Skip to first unread message

Makan Leboss

unread,
Mar 23, 2021, 4:59:57 AM3/23/21
to Kivy users support
i use google colab to convert my kivy app to apk but since 2 weeks i'm getting this error.
someone can help me here ?

# Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=myappMD --bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/content/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21 # ENVIRONMENT: # CUDNN_VERSION = '8.0.4.30' # PYDEVD_USE_FRAME_EVAL = 'NO' # LD_LIBRARY_PATH = '/usr/local/nvidia/lib:/usr/local/nvidia/lib64' # CLOUDSDK_PYTHON = 'python3' # LANG = 'en_US.UTF-8' # HOSTNAME = '6172e3f82769' # OLDPWD = '/' # CLOUDSDK_CONFIG = '/content/.config' # NVIDIA_VISIBLE_DEVICES = 'all' # DATALAB_SETTINGS_OVERRIDES = '{"kernelManagerProxyPort":6000,"kernelManagerProxyHost":"172.28.0.3","jupyterArgs":["--ip=\\"172.28.0.2\\""],"debugAdapterMultiplexerPath":"/usr/local/bin/dap_multiplexer"}' # ENV = '/root/.bashrc' # PAGER = 'cat' # NCCL_VERSION = '2.7.8' # TF_FORCE_GPU_ALLOW_GROWTH = 'true' # JPY_PARENT_PID = '47' # NO_GCE_CHECK = 'True' # PWD = '/content' # HOME = '/root' # LAST_FORCED_REBUILD = '20210316' # CLICOLOR = '1' # DEBIAN_FRONTEND = 'noninteractive' # LIBRARY_PATH = '/usr/local/cuda/lib64/stubs' # GCE_METADATA_TIMEOUT = '0' # GLIBCPP_FORCE_NEW = '1' # TBE_CREDS_ADDR = '172.28.0.1:8008' # TERM = 'xterm-color' # SHELL = '/bin/bash' # GCS_READ_CACHE_BLOCK_SIZE_MB = '16' # PYTHONWARNINGS = 'ignore:::pip._internal.cli.base_command' # MPLBACKEND = 'module://ipykernel.pylab.backend_inline' # CUDA_VERSION = '11.0.3' # NVIDIA_DRIVER_CAPABILITIES = 'compute,utility' # SHLVL = '1' # PYTHONPATH = '/env/python' # NVIDIA_REQUIRE_CUDA = ('cuda>=11.0 brand=tesla,driver>=418,driver<419 ' 'brand=tesla,driver>=440,driver<441 brand=tesla,driver>=450,driver<451') # COLAB_GPU = '0' # GLIBCXX_FORCE_NEW = '1' # PATH = '/root/.buildozer/android/platform/apache-ant-1.9.4/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/tools/node/bin:/tools/google-cloud-sdk/bin:/opt/bin' # LD_PRELOAD = '/usr/lib/x86_64-linux-gnu/libtcmalloc.so.4' # GIT_PAGER = 'cat' # _ = '/usr/local/bin/buildozer' # PACKAGES_PATH = '/root/.buildozer/android/packages' # ANDROIDSDK = '/root/.buildozer/android/platform/android-sdk' # ANDROIDNDK = '/root/.buildozer/android/platform/android-ndk-r19c' # 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

Robert

unread,
Mar 23, 2021, 1:03:30 PM3/23/21
to Kivy users support

# 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

If there is till an issue, share the full log

Makan Leboss

unread,
Mar 24, 2021, 12:50:02 AM3/24/21
to Kivy users support
Exception in thread background thread for pid 13185: Traceback (most recent call last): File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner self.run() File "/usr/lib/python3.7/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "/usr/local/lib/python3.7/dist-packages/sh.py", line 1637, in wrap fn(*rgs, **kwargs) File "/usr/local/lib/python3.7/dist-packages/sh.py", line 2561, in background_thread handle_exit_code(exit_code) File "/usr/local/lib/python3.7/dist-packages/sh.py", line 2265, in fn return self.command.handle_command_exit_code(exit_code) File "/usr/local/lib/python3.7/dist-packages/sh.py", line 865, in handle_command_exit_code raise exc sh.ErrorReturnCode_127:

RAN:
 /content/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/libffi/armeabi-v7a__ndk_target_21/libffi/autogen.sh

STDOUT: 
/content/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/libffi/armeabi-v7a__ndk_target_21/libffi/autogen.sh: 2: exec: autoreconf: not found 

 STDERR: 
 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 "/content/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1260, in <module> main() File "/content/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main ToolchainCL() File "/content/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 709, in __init__ getattr(self, command)(args) File "/content/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 154, in wrapper_func build_dist_from_args(ctx, dist, args) File "/content/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 216, in build_dist_from_args args, "ignore_setup_py", False File "/content/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 577, in build_recipes recipe.build_arch(arch) File "/content/.buildozer/android/platform/python-for-android/pythonforandroid/recipes/libffi/__init__.py", line 40, in build_arch shprint(sh.Command('./autogen.sh'), _env=env) File "/content/.buildozer/android/platform/python-for-android/pythonforandroid/logger.py", line 167, in shprint for line in output: File "/usr/local/lib/python3.7/dist-packages/sh.py", line 911, in next self.wait() File "/usr/local/lib/python3.7/dist-packages/sh.py", line 841, in wait self.handle_command_exit_code(exit_code) File "/usr/local/lib/python3.7/dist-packages/sh.py", line 865, in handle_command_exit_code raise exc sh.ErrorReturnCode_127:  

RAN:
 /content/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/libffi/armeabi-v7a__ndk_target_21/libffi/autogen.sh

STDOUT:
 /content/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/libffi/armeabi-v7a__ndk_target_21/libffi/autogen.sh: 2: exec: autoreconf: not found

STDERR:
 # Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=myappMD --bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/content/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21 # ENVIRONMENT: # CUDNN_VERSION = '8.0.4.30' # PYDEVD_USE_FRAME_EVAL = 'NO' # LD_LIBRARY_PATH = '/usr/local/nvidia/lib:/usr/local/nvidia/lib64' # CLOUDSDK_PYTHON = 'python3' # LANG = 'en_US.UTF-8' # HOSTNAME = '6172e3f82769' # OLDPWD = '/' # CLOUDSDK_CONFIG = '/content/.config' # NVIDIA_VISIBLE_DEVICES = 'all' # DATALAB_SETTINGS_OVERRIDES = '{"kernelManagerProxyPort":6000,"kernelManagerProxyHost":"172.28.0.3","jupyterArgs":["--ip=\\"172.28.0.2\\""],"debugAdapterMultiplexerPath":"/usr/local/bin/dap_multiplexer"}' # ENV = '/root/.bashrc' # PAGER = 'cat' # NCCL_VERSION = '2.7.8' # TF_FORCE_GPU_ALLOW_GROWTH = 'true' # JPY_PARENT_PID = '47' # NO_GCE_CHECK = 'True' # PWD = '/content' # HOME = '/root' # LAST_FORCED_REBUILD = '20210316' # CLICOLOR = '1' # DEBIAN_FRONTEND = 'noninteractive' # LIBRARY_PATH = '/usr/local/cuda/lib64/stubs' # GCE_METADATA_TIMEOUT = '0' # GLIBCPP_FORCE_NEW = '1' # TBE_CREDS_ADDR = '172.28.0.1:8008' # TERM = 'xterm-color' # SHELL = '/bin/bash' # GCS_READ_CACHE_BLOCK_SIZE_MB = '16' # PYTHONWARNINGS = 'ignore:::pip._internal.cli.base_command' # MPLBACKEND = 'module://ipykernel.pylab.backend_inline' # CUDA_VERSION = '11.0.3' # NVIDIA_DRIVER_CAPABILITIES = 'compute,utility' # SHLVL = '1' # PYTHONPATH = '/env/python' # NVIDIA_REQUIRE_CUDA = ('cuda>=11.0 brand=tesla,driver>=418,driver<419 ' 'brand=tesla,driver>=440,driver<441 brand=tesla,driver>=450,driver<451') # COLAB_GPU = '0' # GLIBCXX_FORCE_NEW = '1' # PATH = '/root/.buildozer/android/platform/apache-ant-1.9.4/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/tools/node/bin:/tools/google-cloud-sdk/bin:/opt/bin' # LD_PRELOAD = '/usr/lib/x86_64-linux-gnu/libtcmalloc.so.4' # GIT_PAGER = 'cat' # _ = '/usr/local/bin/buildozer' # PACKAGES_PATH = '/root/.buildozer/android/packages' # ANDROIDSDK = '/root/.buildozer/android/platform/android-sdk' # ANDROIDNDK = '/root/.buildozer/android/platform/android-ndk-r19b' # 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

Andreas Ecker

unread,
Mar 24, 2021, 8:17:52 AM3/24/21
to kivy-...@googlegroups.com
Looks like your environment is missing the installation of autoreconv - see this answer to a similar issue/error: https://github.com/kivy/buildozer/issues/1072#issuecomment-614826219

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/7e68e52d-f332-477b-9346-6c81a434898an%40googlegroups.com.

Pranav Balaji Pooruli

unread,
Mar 24, 2021, 9:52:32 AM3/24/21
to kivy-...@googlegroups.com
You can try using buildozer. It’s way easier to work with.

Robert

unread,
Mar 24, 2021, 12:39:42 PM3/24/21
to Kivy users support
The dependencies are not installed.

Makan Leboss

unread,
Mar 25, 2021, 5:14:06 AM3/25/21
to Kivy users support
I am on google colab. I can't see ~ / .bashrc to add export PATH = $ PATH: ~ / .local / bin /

how to find and modify ~ / .bash on google colab?

Makan Leboss

unread,
Mar 25, 2021, 6:57:50 AM3/25/21
to Kivy users support
thanks to everyone for helping me.
everything is OK now. i convert my  kivy app to apk on google colab with those command:

!sudo apt install python3-pip

!pip3 install kivy

!pip3 install buildozer

!sudo apt update

!sudo apt install -y git zip unzip openjdk-8-jdk python3-pip autoconf libtool pkg-config zlib1g-dev libncurses5-dev libncursesw5-dev libtinfo5 cmake libffi-dev libssl-dev

!pip3 install Cython==0.29.19

!export PATH=$PATH:~/.local/bin/

!buildozer init

!buildozer -v android debug



Robert

unread,
Mar 25, 2021, 1:01:37 PM3/25/21
to Kivy users support
Thank you for sharing the install instructions for Colab. There are not a lot of Colab users yet, but this will be useful for somebody.

Presumably the buildozer 'deploy run' commands do not work from Colab.
If you ever need to run the debugger, this is how:
Reply all
Reply to author
Forward
0 new messages