[Python] use existing env with new exe from pyinstaller

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

  1. Stack

    Stack Membro Participativo

    I would like to reduce the volume of my pyinstaller generated exe that I have to deploy every time.

    I create my app using pyinstaller. when I use the oneflie flag I get ~750MB exe file. w/o the onefile flag, the exe is ~50MB and the _internal folder ~1.6GB (650MB when as zipped). I cannot remove dependencies to reduce the volume

    Is it possible to direct the exe to take the _internal folder from a specified location (for example: C:\Program Files\MyAppDeps v3_internal) such that I can deploy the _internal folder only once in a while (~once per quarter, when there is a new 3rd party dependency) and then distribute only the small exe file every time?

    Users cannot copy the _internal/exe each time to the same directory. Users cannot create symbolic links

    For anyone curious why I want to do this: I update my app very frequently (several times per week) and deploy to machines that are not connected to the any network making the distribution process long and difficult, reducing the distribution volume will improves productivity greatly.

    Continue reading...

Compartilhe esta Página