flet-dev / flet-dev/flet

Flet module does not include binaries when installed with Conda on macOS

Open
#203 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
17k
Forks
694
Avg merge
1d 14h
Merged PRs (30d)
33

Description

Trying 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,
)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the flet/__pyinstaller hook-flet.py entry point shown in the PyInstaller log and inspect how it locates flet/bin in a Conda installation on macOS. Reproduce the counter.py packaging command in the reported environment; done means PyInstaller finds and includes the Flet binaries without the missing-path warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.