I wrote a simple script in python 3.7 and I coverted it in .exe from cmd with the following line pyinstaller -w -F -i [myicon.ico] [myscript.py]
. My script works if i launch it from command line (python myscript.py
), but it doesn't work when i click on "Myscript.exe" (I have a window with this message :"Failed to execute script Myscript").
I try to create the same script without the icon but result is the same.
Someone can help me?
Asked
Active
Viewed 3,360 times
0

Luca Pastore
- 1
- 1
- 2
-
Is it the only error? What is your simple script? is pytinstaller installed in the same python? (Just use python -m pyinstaller instead of pyinstaller to be sure) – BlueSheepToken Jan 16 '19 at 13:38
1 Answers
0
You can refer to that post: Windows- Pyinstaller Error "failed to execute script " When App Clicked
Actually the answer is that python doesn't compile the icon and so you need to manually transfert the icon in the folder containing the .exe.
B

Benoit Mailhot
- 1
- 1