Slow-opening pyinstaller-generated EXE #9080
-
|
Hi All, I am using pyinstaller to generate an exe file from my python script, with the following set-up:
I have tried to do "lazy imports", i.e. minimizing the imports at the beginning of my script but this didn't reduce significantly the opening time. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
Are you using onefile mode? It would help if you can identify if the startup delay comes from before or after all the data science monstrosities libraries (just adding print statements before and after the imports would do). And just to confirm, you're not running this off a synced/network drive or some other artificial file system? |
Beta Was this translation helpful? Give feedback.
A spec file is in whatever mode you specified when you generated it.
pyinstaller xyz.pycreates a onedir spec andpyinstaller --onefile xyz.pycreates a onefile spec.Give onedir mode a go. Onefile mode doesn't scale well on Windows.