[英]How can I fix icon of python executable after using pyinstaller?
When I want to create an exe
file using pyinstaller
in IDE called pycharm
.当我想在 IDE 中使用
pyinstaller
创建一个名为pycharm
的exe
文件时。 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!执行以下命令后打开
main.exe
出现问题: pyinstaller --onefile --windowed --icon=savings.ico main.py
或pyinstaller.exe --onefile --windowed --icon=savings.ico main.py
,我可以在我的目录文件夹C:\Users\user\PycharmProjects\PythonLesson\dist
上找到真正创建的可执行文件,但是当我点击它时main.exe
没有任何反应! But I see main.exe
running behind the scenes in Task Manager .但我看到
main.exe
在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).如何让
main.exe
立即打开,而不是在任务管理器的后台运行(单击后我看不到main.exe
在桌面上运行)。 Maybe it depends on icon of exe?也许这取决于exe的图标?
Is your main.py
a script or a GUI application?您的
main.py
是脚本还是 GUI 应用程序? 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
.如果您希望终端出现,请不要使用
--windowed
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.