-4

I am trying to convert my .py program to .exe, but when the process is complete and I am opening my dist folder and trying to execute it, it is coming "Failed to execute script 'filename' ". Please give me a soln. to this. I am using "pyinstaller --onefile -w filename.py" to create my .exe file.

Joe
  • 41,484
  • 20
  • 104
  • 125
  • https://stackoverflow.com/questions/40716346/windows-pyinstaller-error-failed-to-execute-script-when-app-clicked – Joe Dec 18 '19 at 18:28
  • https://stackoverflow.com/questions/51108155/pyinstaller-exe-failed-to-execute-script – Joe Dec 18 '19 at 18:28
  • It seems like there is already a solution for this with the provided links. – Sailanarmo Dec 18 '19 at 20:06

2 Answers2

2

Add an extra parameter --debug in the pyinstaller command. This will give more information about the error when you click on exe file to execute it. This will help in identifying the problem. This could be a file missing in the path

hithyshi
  • 713
  • 1
  • 5
  • 11
0

Try moving the .exe file from dist to the root folder