简体   繁体   English

使用 pyinstaller 后如何修复 python 可执行文件的图标?

[英]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创建一个名为pycharmexe文件时。 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.pypyinstaller.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.exeTask 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.

相关问题 使用 Pyinstaller 后在 Windows 中打开 python 可执行文件时出错 - Error opening python executable in Windows after using Pyinstaller 使用PyInstaller创建Python可执行文件后,权限被拒绝 - Permission denied after using PyInstaller to create Python executable 如何将多个文件夹层次结构中的所有 python 文件导入单个 pyinstaller 可执行文件? - How can I import all my python files in multiple folder hierarchy into a single pyinstaller executable? 使用 pyinstaller 构建可执行文件,带有 Windows 默认的可执行文件图标 - Building an executable using pyinstaller, with windows default executable icon pyinstaller:当我用pyinstaller制作.exe文件时,在python中使用内置函数打开的可执行文件关闭1秒 - Pyinstaller: Executable file opened with built in function in python closes after 1 sec when i make .exe file with pyinstaller 如何使用 PyInstaller 将 python 脚本转换为二进制可执行文件 - How to convert python scripts to binary executable using PyInstaller 如何使用 pyinstaller 创建最小大小的可执行文件? - How can I create the minimum size executable with pyinstaller? 如何使用 pyinstaller 在可执行文件中包含 .dll 文件? - How do I include .dll file in executable using pyinstaller? 我使用pyinstaller创建了python可执行文件,但是执行可执行文件时不存在导入到.py脚本的模块 - I created a python executable by using pyinstaller, but the module imported to my .py script is not present when I execute executable 如何将python 3.3脚本转换为可执行文件? 我找到了PyInstaller和py2exe,但是都不支持3.3。 - How can I turn a python 3.3 script into executable file? I found PyInstaller and py2exe, but both did not support 3.3
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM