When I want to create an exe
file using pyinstaller
in IDE called pycharm
. I have a problem to open main.exe
after I did these commands:
pyinstaller --onefile --windowed --icon=savings.ico main.py
or pyinstaller.exe --onefile --windowed --icon=savings.ico main.py
,I can find that executable file really created on my directory folder C:\Users\user\PycharmProjects\PythonLesson\dist
but when I clicking on it main.exe
nothing happens! But I see main.exe
running behind the scenes in Task Manager. How can I make main.exe
open immediately instead of just running behind the scenes in Task Manager (I can't see main.exe
running on Desktop after clicking on it).
Maybe it depends on icon of exe?
Is your main.py
a script or a GUI application? If it's a script, then nothing will "show up" because there's nothing to show up. If you were expecting a terminal to show up, then don't use --windowed
.