Flet module does not include binaries when installed with Conda on macOS
See original GitHub issueTrying to package a simple demo app:
╰─ pyinstaller counter.py (flet-test)
291 INFO: PyInstaller: 5.1
291 INFO: Python: 3.10.5 (conda)
320 INFO: Platform: macOS-12.5.1-arm64-i386-64bit
321 INFO: wrote /Users/cls/Documents/Work/Projects/PrototypeFund/Dev/flet-test/counter.spec
326 INFO: UPX is not available.
327 INFO: Extending PYTHONPATH with paths
['/Users/cls/Documents/Work/Projects/PrototypeFund/Dev/flet-test']
697 INFO: checking Analysis
698 INFO: Building Analysis because Analysis-00.toc is non existent
698 INFO: Initializing module dependency graph...
699 INFO: Caching module graph hooks...
707 INFO: Analyzing base_library.zip ...
3546 INFO: Processing pre-find module path hook distutils from '/Users/cls/miniforge3/envs/flet-test/lib/python3.10/site-packages/PyInstaller/hooks/pre_find_module_path/hook-distutils.py'.
3639 INFO: distutils: retargeting to non-venv dir '/Users/cls/miniforge3/envs/flet-test/lib/python3.10'
4468 INFO: Caching module dependency graph...
4565 INFO: running Analysis Analysis-00.toc
4569 INFO: Analyzing /Users/cls/Documents/Work/Projects/PrototypeFund/Dev/flet-test/counter.py
5524 INFO: Processing pre-safe import module hook six.moves from '/Users/cls/miniforge3/envs/flet-test/lib/python3.10/site-packages/PyInstaller/hooks/pre_safe_import_module/hook-six.moves.py'.
5778 INFO: Processing module hooks...
5779 INFO: Loading module hook 'hook-flet.py' from '/Users/cls/miniforge3/envs/flet-test/lib/python3.10/site-packages/flet/__pyinstaller'...
Unable to find "/Users/cls/miniforge3/envs/flet-test/lib/python3.10/site-packages/flet/bin" when adding binary and data files.
This is the full app:
import flet
from flet import icons
def main(page: flet.Page):
page.title = "Counter"
page.vertical_alignment = "center"
text_field = flet.TextField(
value=0,
width=100,
text_align="right",
)
def minus_clicked(event):
text_field.value = int(text_field.value) - 1
page.update()
def plus_clicked(event):
text_field.value = int(text_field.value) + 1
page.update()
page.add(
flet.Row(
[
flet.Text("Counter"),
flet.IconButton(
icons.REMOVE,
on_click=minus_clicked,
),
text_field,
flet.IconButton(
icons.ADD,
on_click=plus_clicked,
)
],
alignment="center",
)
)
flet.app(
target=main,
)
Issue Analytics
- State:
- Created a year ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
grpcio or grpcio-tools does not anymore compile with Apple ...
I am using M1 chip macbook air. Any workaround for this issue? 2
Read more >Installing on macOS - Conda
In your terminal window or Anaconda Prompt, run the command conda list . A list of installed packages appears if it has been...
Read more >I can't install TensorFlow-macos a… | Apple Developer Forums
This involves installing "Conda", using it to install the dependencies and finally installing tensorflow-macos and tensorflow-metal via "python -m pip install .
Read more >Installing Cryptography on an Apple Silicon M1 Mac
This issue is due to a mismatch between the libffi header version and the version of libffi the dynamic linker finds.
Read more >pip install - pip documentation v22.3.1
Install packages from source. Do not use any binary packages. Unix/macOS. python -m pip install SomePackage1 SomePackage2 --no- ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
OK, thanks for confirming it works with
pip
. I might play with conda sometime later. Would you mind if I rename this issue to “Flet module does not include binaries when installed with Conda on macOS”?I don’t know enough about packaging to have an idea about that.
Testing the pip-installed
flet
withpyinstaller
:The resulting
dist/counter
binary works too.