-
QuestionI've been setting up a small example project for SQLAlchemy 2.0 and Android on request of Feodor: I set everything up with poetry and a pyproject.toml initially:
This setup works with "poetry run flet build apk -v" and succesfully builds to have a simple todo app that utilizes an SQLite database on the emulator/phone for tasks. But when switching to uv with "uv build flet build apk -v" and the following pyproject.toml:
The build no longer works because of a missing dependency for flet-cli. I've tried 3 flet[all] versions as dependencies (0.25.0, 0.26.0 and 0.27.0.dev4122). Neither solve the build error. I also tried a different build system (setuptools) but that didn't solve it either. Any idea what might be causing this issue with uv builds compared to poetry builds? Code sampleNo response Error message[14:26:27] Flutter 3.27.3 installed ✅
Flutter executable:
/home/jcremers/flutter/3.27.3/bin/flutter
Dart executable:
/home/jcremers/flutter/3.27.3/bin/dart
JDK installed at /home/jcremers/java/17.0.13+11
Configuring Flutter's path to JDK
Run subprocess:
['/home/jcremers/flutter/3.27.3/bin/flutter',
'config', '--suppress-analytics',
'--jdk-dir=/home/jcremers/java/17.0.13+11']
[14:26:28] Setting "jdk-dir" value to
"/home/jcremers/java/17.0.13+11".
You may need to restart any open editors for them
to read new settings.
JDK installed ✅
Android SDK installation found at
/home/jcremers/Android/sdk
Android SDK package "cmdline-tools;latest" is
already installed
Android SDK package "platform-tools" is already
installed
Android SDK package "platforms;android-35" is
already installed
Android SDK package "build-tools;34.0.0" is already
installed
Android SDK installed ✅
Custom Flutter dependencies: {}
[14:26:30] Created Flutter bootstrap project from
gh:flet-dev/flet-build-template with ref "0.26.0"
✅
Run subprocess:
['/home/jcremers/flutter/3.27.3/bin/dart', 'run',
'--suppress-analytics', 'serious_python:main',
'package',
'/home/jcremers/Repositories/flet-todo-android/src'
, '--platform', 'Android', '--requirements',
'SQLAlchemy==2.0.36,flet==0.26.0', '--exclude',
'build', '--cleanup']
[14:26:31] Running package command
Extra PyPi indexes:
Created temp directory:
/tmp/serious_python_tempRCPWJR
Copying Python app from
/home/jcremers/Repositories/flet-todo-android/src
to a temp directory
Cleanup app
Configured Android/arm64-v8a platform with
sitecustomize.py
Installing [SQLAlchemy==2.0.36, flet==0.26.0] with
pip command to
/home/jcremers/Repositories/flet-todo-android/build
/site-packages/arm64-v8a
[14:26:37] ERROR: Could not find a version that satisfies the
requirement watchdog<5.0.0,>=4.0.0 (from flet-cli)
(from versions: none)
ERROR: No matching distribution found for
watchdog<5.0.0,>=4.0.0
<_io.TextIOWrapper name=5 encoding='utf8'>
Run subprocess:
['/home/jcremers/flutter/3.27.3/bin/flutter',
'doctor', '--no-version-check',
'--suppress-analytics']
[14:26:42] Doctor summary (to see all details, run flutter
doctor -v):
[✓] Flutter (Channel stable, 3.27.3, on Debian
GNU/Linux 12 (bookworm)
5.15.167.4-microsoft-standard-WSL2, locale
en_US.UTF-8)
[✓] Android toolchain - develop for Android devices
(Android SDK version 34.0.0)
[✗] Chrome - develop for the web (Cannot find
Chrome executable at google-chrome)
! Cannot find Chrome. Try setting
CHROME_EXECUTABLE to a Chrome executable.
[✗] Linux toolchain - develop for Linux desktop
✗ clang++ is required for Linux development.
It is likely available from your distribution
(e.g.: apt install clang), or can be downloaded
from https://releases.llvm.org/
✗ CMake is required for Linux development.
It is likely available from your distribution
(e.g.: apt install cmake), or can be downloaded
from https://cmake.org/download/
✗ ninja is required for Linux development.
It is likely available from your distribution
(e.g.: apt install ninja-build), or can be
downloaded from
https://github.com/ninja-build/ninja/releases
✗ GTK 3.0 development libraries are required
for Linux development.
They are likely available from your
distribution (e.g.: apt install libgtk-3-dev)
[!] Android Studio (not installed)
[✓] Connected device (1 available)
[✓] Network resources
! Doctor found issues in 3 categories.
╭────────────────────────────────────────────────────────────╮
│ Error building Flet app - see the log of failed command │
│ above. │
╰────────────────────────────────────────────────────────────╯ ------------------------------------------------------
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
edit: the issue is related to the dependencies = [ flet[all], replacing this with only flet will solve the issue and enable uv build. |
Beta Was this translation helpful? Give feedback.
edit:
just to recap. this issue is not related solely on the flet[all] dependency. but how uv solves it dependencies. in a clean repo uv install + uv run flet build will still cause a ModuleNotFoundError with "flet == 0.26.0". it seems that there is something wrong with how uv solves the dependencies. switching to poetry instead of uv will solve the issue properly.
the issue is related to the dependencies = [
"flet[all]==0.26.0",
"SQLAlchemy==2.0.36"
]
flet[all], replacing this with only flet will solve the issue and enable uv build.