I create a single file python application with Pyinstaller using --onefile parameters. Everything work as expected but the startup time is around 10 seconds on my machine. T
I have been battling with this problem myself. Unfortunately, there is no feasible solution to the problem other than using the ugly console (completely agree there).
The problem stems from the fact that until PyInstaller unpacks all the files into a temp dir, no scripts will be run. From my research, there is no way to alter this functionality using currently available options within PyInstaller. It would be nice if the community behind PyInstaller would make this a standard feature of the module, but until then we may have to explore other installer options.
Happy programming!
One simple solution might be to display the console window after launching the application, which will output the status of the PyInstaller Bootloader while it is being opened.
To display the console, use the --console
flag (or edit the .spec file to contain console = True
) when bundling your application. These options are documented in the PyInstaller doc file.