Buildozer debug failed in c4k_tfilte example code

15 views Asked by At

I want to debug the c4k_tfilte example code, but I keep getting errors

The c4k_photo and c4k_opencv codes run normally, but only tflite doesn't run Within the entire c4k_tflite code, I have done the package and java installation needed to run main.py

I'll upload the error code

Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/hhh/c4k_tflite_example/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1256, in <module>
    main()
  File "/home/hhh/c4k_tflite_example/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main
    ToolchainCL()
  File "/home/hhh/c4k_tflite_example/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 685, in __init__
    getattr(self, command)(args)
  File "/home/hhh/c4k_tflite_example/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 104, in wrapper_func
    build_dist_from_args(ctx, dist, args)
  File "/home/hhh/c4k_tflite_example/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 163, in build_dist_from_args
    build_recipes(build_order, python_modules, ctx,
  File "/home/hhh/c4k_tflite_example/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 504, in build_recipes
    recipe.build_arch(arch)
  File "/home/hhh/c4k_tflite_example/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 934, in build_arch
    self.install_python_package(arch)
  File "/home/hhh/c4k_tflite_example/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 950, in install_python_package
    shprint(hostpython, 'setup.py', 'install', '-O2',
  File "/home/hhh/c4k_tflite_example/.buildozer/android/platform/python-for-android/pythonforandroid/logger.py", line 167, in shprint
    for line in output:
  File "/home/hhh/.local/lib/python3.10/site-packages/sh.py", line 915, in next
    self.wait()
  File "/home/hhh/.local/lib/python3.10/site-packages/sh.py", line 845, in wait
    self.handle_command_exit_code(exit_code)
  File "/home/hhh/.local/lib/python3.10/site-packages/sh.py", line 869, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1:

  RAN: /home/hhh/c4k_tflite_example/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/native-build/python3 setup.py install -O2 --root=/home/hhh/c4k_tflite_example/.buildozer/android/platform/build-arm64-v8a/build/python-installs/c4k_tflite/arm64-v8a --install-lib=.

  STDOUT:
Traceback (most recent call last):
  File "/home/hhh/.local/bin/cmake", line 5, in <module>
    from cmake import cmake
ModuleNotFoundError: No module named 'cmake'
Traceback (most recent call last):
  File "/home/hhh/c4k_tflite_example/.buildozer/android/platform/build-arm64-v8a/build/other_builds/pybind11/arm64-v8a__ndk_target_21/pybind11/setup.py", line 117, in remove_output
    yield
  File "/home/hhh/c4k_tflite_example/.buildozer/android/platform/build-arm64-v8a/build/other_builds/pybind11/arm64-v8a__ndk_target_21/pybind11/setup.py", line 139, in <module>
    subprocess.run(cmd, check=True, cwd=DIR, stdout=sys.stdout, stderr=sys.stderr)
  File "/home/hhh/c4k_tflite_example/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Lib/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['cmake', '-S', '.', '-B', '/tmp/tmp4iry6ao4', '-DCMAKE_INSTALL_PREFIX=pybind11', '-DBUILD_TESTING=OFF', '-DPYBIND11_NOPYTHON=ON', '-Dprefix_for_pc_file=${pcfiledir}/../../']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/hhh/c4k_tflite_example/.buildozer/android/platform/build-arm64-v8a/build/other_builds/pybind11/arm64-v8a__ndk_target_21/pybind11/setup.py", line 123, in <module>
    with remove_output("pybind11/include", "pybind11/share"):
  File "/home/hhh/c4k_tflite_example/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Lib/contextlib.py", line 155, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/home/hhh/c4k_tflite_example/.buildozer/android/platform/build-arm64-v8a/build/other_builds/pybind11/arm64-v8a__ndk_target_21/pybind11/setup.py", line 120, in remove_output
    shutil.rmtree(src)
  File "/home/hhh/c4k_tflite_example/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Lib/shutil.py", line 722, in rmtree
    onerror(os.lstat, path, sys.exc_info())
  File "/home/hhh/c4k_tflite_example/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Lib/shutil.py", line 720, in rmtree
    orig_st = os.lstat(path, dir_fd=dir_fd)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'pybind11/include'


  STDERR:

# Command failed: ['/usr/bin/python3', '-m', 'pythonforandroid.toolchain', 'create', '--dist_name=c4k_tflite', '--bootstrap=sdl2', '--requirements=python3,kivy,camera4kivy,gestures4kivy,numpy,tflite-runtime', '--arch=arm64-v8a', '--copy-libs', '--color=always', '--storage-dir=/home/hhh/c4k_tflite_example/.buildozer/android/platform/build-arm64-v8a', '--ndk-api=21', '--hook=/home/hhh/c4k_tflite_example/camerax_provider/gradle_options.py', '--ignore-setup-py', '--debug']
# ENVIRONMENT:
#     SHELL = '/bin/bash'
#     WSL2_GUI_APPS_ENABLED = '1'
#     WSL_DISTRO_NAME = 'Ubuntu'
#     JAVA_HOME = '/usr/lib/jvm/java-17-openjdk-amd64'
#     NAME = 'DESKTOP-FSUMKEQ'
#     PWD = '/home/hhh/c4k_tflite_example'
#     LOGNAME = 'hhh'
#     HOME = '/home/hhh'
#     LANG = 'C.UTF-8'
#     WSL_INTEROP = '/run/WSL/353_interop'
#     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:*.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:'
#     WAYLAND_DISPLAY = 'wayland-0'
#     LESSCLOSE = '/usr/bin/lesspipe %s %s'
#     TERM = 'xterm-256color'
#     LESSOPEN = '| /usr/bin/lesspipe %s'
#     USER = 'hhh'
#     DISPLAY = ':0'
#     SHLVL = '1'
#     ANDROID_SDK_ROOT = '/home/hhh/Android/Sdk'
#     XDG_RUNTIME_DIR = '/run/user/1000/'
#     WSLENV = ''
#     XDG_DATA_DIRS = '/usr/local/share:/usr/share:/var/lib/snapd/desktop'
#     PATH = ('/home/hhh/.buildozer/android/platform/apache-ant-1.9.4/bin:/home/hhh/.local/bin:/usr/lib/jvm/java-8-openjdk-amd64/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program '
 'Files/WindowsApps/MicrosoftCorporationII.WindowsSubsystemForLinux_2.1.4.0_x64__8wekyb3d8bbwe:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Users/HHH/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/HHH/AppData/Local/Programs/Microsoft '
 'VS '
 'Code/bin:/snap/bin:/home/hhh/.local/bin/:/snap/bin/flutter/bin:/usr/bin/java:/usr/lib/jvm/java-17-openjdk-amd64/bin')
#     DBUS_SESSION_BUS_ADDRESS = 'unix:path=/run/user/1000/bus'
#     CLASS_PATH = '/usr/lib/jvm/java-8-openjdk-amd64/lib:'
#     HOSTTYPE = 'x86_64'
#     PULSE_SERVER = 'unix:/mnt/wslg/PulseServer'
#     OLDPWD = '/home/hhh'
#     _ = '/home/hhh/.local/bin/buildozer'
#     PACKAGES_PATH = '/home/hhh/.buildozer/android/packages'
#     ANDROIDSDK = '/home/hhh/.buildozer/android/platform/android-sdk'
#     ANDROIDNDK = '/home/hhh/.buildozer/android/platform/android-ndk-r25b'
#     ANDROIDAPI = '33'
#     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 information above is from buildozer Error when executing buildozer -v android debug command

0

There are 0 answers