I'm trying to make my python program run on other systems without python installation. I made use of tkinter to create a gui, after creating an exe file with pyinstaller it throws a fatal error "Failed to run script". I've checked my code several times and it works well. I don't know what's wrong.
The error is very generic and at this point, it may not be possible to find the actual error what preventing the execution.
In order to get actual error please exclude '--windowed' or '--noconsole' parameters during installation and then execute with 'pyinstaller -filename.py --onefile'. Then on execution it will show exact error instead of 'Fatal error! Failed to execute script'. Then you can proceed accordingly.
Fatal error! failed to execute script when creating executable file