Skip to content

Do not import imgui_bundle.immapp.immapp_notebook by default #357

@remss

Description

@remss

Hello Team!

When importing imgui_bundle, it imports by default immapp which imports immapp_notebook.
Inside immapp_notebook there is _run_app_function_and_display_image_in_notebook() that will import cv2, PIL, IPython

When using pyinstaller to freeze the my python entry point to a .exe it will detect imports of cv2/Pil/IPython and will embed them in final build.

Would it be possible to remove from immapp_init_.py the from imgui_bundle.immapp.immapp_notebook import run_nb as run_nb ?

So users currenlty doing like this

from imgui_bundle import immapp
immapp.run_nb()

would have to do do like this

from imgui_bundle.immapp.immapp_notebook 
immapp_notebook .run_nb()

This will solve issue with pyinstaller embedding things that should not be here.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    waiting_for_op_answerWaiting for an answer from original poster

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions