-
Questionflet build windows with a serial module actually named pyserial, but it shows module serial cannot be found when open the app. Code sampleimport serial
import serial.tools.list_ports Error message[09:26:13] Created Flutter bootstrap project from gh:flet-dev/flet-build-template with ref "0.26.0" ✅
[09:27:09] Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.27.3, on Microsoft Windows [版本 10.0.22631.4890], locale zh-CN)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[X] Android toolchain - develop for Android devices
X Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/to/windows-android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, please use
`flutter config --android-sdk` to update to that location.
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.13.1)
[!] Android Studio (not installed)
[√] Connected device (3 available)
[!] Network resources
X A network error occurred while checking "https://github.com/": 信号灯超时时间已到
! Doctor found issues in 3 categories.
Flet app package app/app.zip was not created. ------------------------------------------------------
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
it seems like a very stupid problem that flet build will pack not a single site-packages at all, and it cannot just copy packages to it because the packed app cannot recognize 2-level directory, so how to fix this problem? This place is so cold, is anybody here? |
Beta Was this translation helpful? Give feedback.
and the problem can be solved by added following to pyproject.toml, all by yourself
dependencies = [
"flet==0.26.0",
"pyserial==3.5",
"control>=0.9.4",
"numpy>=1.25.0",
"matplotlib>=3.7.1",
"pandas>=2.1.3",
]