Python flet on termux, is it even possible?

37 Views Asked by At

Flet is a relatively new but powerful technology and I'm currently working on a flet desktop project, but I want to work on it while I'm not home and I don't know if flet and termux are ready to work together yet.

What I'm looking for

Flet projects with hot reload running on Android

My device

  • Lenovo TAB 3rdGen
  • Android 12
  • aarch64

steps followed

  • Install termux from f-droid
  • Install python pkg install python
  • install pip pkg install python-pip
  • try install flet pip install flet
  • getting rust compiler not found error
  • install rust successfully pkg install rust
  • try again
  • getting this error
Running `/data/data/com.termux/files/usr/tmp/pip-install-dwruddbi/maturin_72d4713a9e85448ca459f39c0a54cc6e/target/release/build/psm-a05bc41960736b49/build-script-build`
            error: failed to run custom build command for `psm v0.1.21`

            Caused by:
              process didn't exit successfully: `/data/data/com.termux/files/usr/tmp/pip-install-dwruddbi/maturin_72d4713a9e85448ca459f39c0a54cc6e/target/release/build/psm-a05bc41960736b49/build-script-build` (exit status: 1)
              --- stdout
              OPT_LEVEL = Some("3")
              TARGET = Some("aarch64-linux-android")
              HOST = Some("aarch64-linux-android")
              cargo:rerun-if-env-changed=CC_aarch64-linux-android
              CC_aarch64-linux-android = None
              cargo:rerun-if-env-changed=CC_aarch64_linux_android
              CC_aarch64_linux_android = None
              cargo:rerun-if-env-changed=HOST_CC
              HOST_CC = None
              cargo:rerun-if-env-changed=CC
              CC = None
              cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
              cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
              CRATE_CC_NO_DEFAULTS = None
              DEBUG = Some("false")
              cargo:rerun-if-env-changed=CFLAGS_aarch64-linux-android
              CFLAGS_aarch64-linux-android = None
              cargo:rerun-if-env-changed=CFLAGS_aarch64_linux_android
              CFLAGS_aarch64_linux_android = None
              cargo:rerun-if-env-changed=HOST_CFLAGS
              HOST_CFLAGS = None
              cargo:rerun-if-env-changed=CFLAGS
              CFLAGS = None
              cargo:rustc-cfg=asm
              cargo:rustc-cfg=switchable_stack
              cargo:rerun-if-env-changed=AR_aarch64-linux-android
              AR_aarch64-linux-android = None
              cargo:rerun-if-env-changed=AR_aarch64_linux_android
              AR_aarch64_linux_android = None
              cargo:rerun-if-env-changed=HOST_AR
              HOST_AR = None
              cargo:rerun-if-env-changed=AR
              AR = None
              cargo:rerun-if-env-changed=ARFLAGS_aarch64-linux-android
              ARFLAGS_aarch64-linux-android = None
              cargo:rerun-if-env-changed=ARFLAGS_aarch64_linux_android
              ARFLAGS_aarch64_linux_android = None
              cargo:rerun-if-env-changed=HOST_ARFLAGS
              HOST_ARFLAGS = None
              cargo:rerun-if-env-changed=ARFLAGS
              ARFLAGS = None

              --- stderr


              error occurred: Failed to find tool. Is `aarch64-linux-android-ar` installed?


            warning: build failed, waiting for other jobs to finish...
            error: `cargo build --manifest-path Cargo.toml --message-format=json-render-diagnostics --release -v --no-default-features --locked` failed with code 101
            [end of output]

        note: This error originates from a subprocess, and is likely not a problem with pip.
        ERROR: Failed building wheel for maturin
      Failed to build maturin
      ERROR: Could not build wheels for maturin, which is required to install pyproject.toml-based projects
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

GitHub codespace

I know I could use a GitHub codespace, Python compiles flet projects there using python main.py but in order to use hot reload You have to use flet run main.py which gives me other error I'm making another post for.

edit

Seems like I forgot to Say that I installed rust successfully when I first posted the question, that works just fine, It's the next step the one that stops me

0

There are 0 best solutions below