[Python] adding hidden imports in .spec file doesnt seem to change anything pyinstaller

Discussão em 'Python' iniciado por Stack, Setembro 5, 2025.

  1. Stack

    Stack Membro Participativo

    I have been playing around with compiling an app with pyinstaller but it doesn't seem to work properly.

    my .spec file contains the following line in the Analysis object decleration: hiddenimports=['casadi', 'casadi._casadi'],

    yet i still get this issue when i run the app: import still fails after allegedly manually importing the missing module

    I'm confused because I know this module is imported with 'importlib.load_module()' and pyinstaller doesnt analyze this import, so you need to manually bundle this in the app. yet i seem to have bundeled it and it doesnt work. why is that?

    P.s:, I didnt get any compliation errors in the console when i ran pyinstaller on the .spec file

    this is my repo: https://github.com/YahliGilboa/tray_creator/tree/master

    thanks in advance!

    Continue reading...

Compartilhe esta Página