flet-dev / flet

Flet enables developers to easily build realtime web, mobile and desktop apps in Python. No frontend experience required.
https://flet.dev
Apache License 2.0
9.97k stars 392 forks source link

After app build application can not find python package #3001

Open fredykoci opened 3 months ago

fredykoci commented 3 months ago

Snímek obrazovky 2024-04-08 v 12 41 50

after build on macos

flet version 0.21.2 python version 3.9.6 on mac silicon

marc-svg commented 2 months ago

I think it is the same issue: from simple flet app:

import flet as ft def main(page: ft.Page): page.add(ft.SafeArea(ft.Text("Hello, Flet!"))) ft.app(main)

Error running app Traceback (most recent call last): File "", line 40, in File "", line 229, in run_module File "", line 88, in _run_code File "/var/folders/1b/pmdh6fxx4514vl_t0n8ct1w80000gn/T/serious_python_tempeqE4G4/main.py", line 1, in File "/var/folders/1b/pmdh6fxx4514vl_t0n8ct1w80000gn/T/serious_python_tempeqE4G4/pypackages/flet/init.py", line 1, in File "/var/folders/1b/pmdh6fxx4514vl_t0n8ct1w80000gn/T/serious_python_tempeqE4G4/pypackages/flet_runtime/init.py", line 1, in File "/var/folders/1b/pmdh6fxx4514vl_t0n8ct1w80000gn/T/serious_python_tempeqE4G4/pypackages/flet_core/init.py", line 1, in File "/var/folders/1b/pmdh6fxx4514vl_t0n8ct1w80000gn/T/serious_python_tempeqE4G4/pypackages/flet_core/audio.py", line 4, in File "/var/folders/1b/pmdh6fxx4514vl_t0n8ct1w80000gn/T/serious_python_tempeqE4G4/pypackages/flet_core/control.py", line 11, in File "/var/folders/1b/pmdh6fxx4514vl_t0n8ct1w80000gn/T/serious_python_tempeqE4G4/pypackages/flet_core/utils/init.py", line 1, in File "/var/folders/1b/pmdh6fxx4514vl_t0n8ct1w80000gn/T/serious_python_tempeqE4G4/pypackages/flet_core/utils/concurrency_utils.py", line 1, in File "./asyncio/init.py", line 8, in File "./asyncio/base_events.py", line 25, in File "/Users/appveyor/projects/serious-python/dist/root/python3/lib/python3.11/subprocess.py", line 104, in ModuleNotFoundError: No module named '_posixsubprocess'

Build on mac and running on iPhone

flet version 0.22.0 python 3.12.2 on mac silicon

had the same issue since flet 0.21 but thought would be solved with new flet version

Thanks

phanstudio commented 2 months ago

i encountered the problem, i just added the library to the requirements.txt eg. uuid==1.30 flet

phanstudio commented 2 months ago

try this it should help. i still have an issue: C:\Users\ajuga\AppData\Local\Android\sdk\ndk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\bin\llvm-strip.exe: error: 'C:\Users\ajuga\AppData\Local\Temp\flet_flutter_build_b66Tj6w6Ss\build\serious_python_android\intermediates\merged_native_libs\release\out\lib\arm64-v8a\libpythonbundle.so': The file was not recognized as a valid object file

C:\Users\ajuga\AppData\Local\Android\sdk\ndk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\bin\llvm-strip.exe: error: 'C:\Users\ajuga\AppData\Local\Temp\flet_flutter_build_b66Tj6w6Ss\build\serious_python_android\intermediates\merged_native_libs\release\out\lib\armeabi-v7a\libpythonbundle.so': The file was not recognized as a valid object file

C:\Users\ajuga\AppData\Local\Android\sdk\ndk\23.1.7779620\toolchains\llvm\prebuilt\windows-x86_64\bin\llvm-strip.exe: error: 'C:\Users\ajuga\AppData\Local\Temp\flet_flutter_build_b66Tj6w6Ss\build\serious_python_android\intermediates\merged_native_libs\release\out\lib\x86_64\libpythonbundle.so': The file was not recognized as a valid object file

marc-svg commented 2 months ago

@fredykoci have you got a solution to your issue ?