I'm using pyinstaller to produce an exectuable for a python program. But, whenever I try to use a generated executable, I get a message window that reads "Failed to execute script ...".
The command I'm running is pyinstaller -w run.py
. But, when run with the --debug
option a different error is made apparent. "Failed to execute script pyiboot-1_bootstrap". After this error it kills the program.
I tried with the -F
option and that did not change the outcome. All the files I created for the project are in the same directory. I did get warnings that dll's weren't being included but I resolved that.
Pyinstaller doesn't like the built in quit()
function I was using.
Instead use sys.exit()
to close the program.
See this question to see why sys.exit()
is better practice for production code.