Search code examples
pythonpyinstaller

Pyinstaller getting error -"failed to execute script "


Please check this Image to see the problem

I have converted to exe file using pyinstaller but it is not running and showing this error in command line. Please tell me how to make it run. In the python program I have one icon picture and one excel file. Also I am running the exe from the same folder where icon and excel are present means I have copied .exe from the dist folder to main folder. Please Help me.


Solution

  • I got my answer by myself (isn't it funny 😂) To know the solution just see this video - https://youtu.be/2gu5stlEtms

    He modified the .spec file and added the imports which are not automatically done by python. This will surely help you