Som*_*ter 27 python explorer icons executable pyinstaller
我使用命令:
pyinstaller.exe --icon=test.ico -F --noconsole test.py
Run Code Online (Sandbox Code Playgroud)
所有图标都不会更改为test.ico
一些图标保持默认(pyinstaller)图标...
为什么?
所有图标更改操作系统 - > Windows 7 32位,Windows 7 64位(制作exe文件操作系统)
保持默认图标OS - > windows 7 64bit(其他PC)
J. *_*Saw 51
我知道这是旧的等等(并且不确定它是否是一个问题),但在搜索之后,我成功使用此命令--onefile:
pyinstaller.exe --onefile --windowed --icon=app.ico app.py
Run Code Online (Sandbox Code Playgroud)
当我在寻找如何为我的.exe设置图标的答案时,Google引导我访问此页面,所以它可能会帮助其他人.
此处的信息可在以下网站找到:https://mborgerson.com/creating-an-executable-from-a-python-script
Ala*_*n L 26
我认为这可能与缓存有关(可能在Windows资源管理器中).我在旧的PyInstaller图标也显示在几个地方,但当我在其他地方复制exe时,所有旧图标都消失了.
小智 10
我有类似的问题。如果 pyinstaller 没有错误,请尝试更改 .exe 文件的名称。这个对我有用
小智 9
下面的命令可以在可执行文件上设置图标。请记住,“。ico”文件应该出现在“ Path_of_.ico_file”中给定的路径的位置。
pyinstaller.exe --onefile --windowed --icon =“ Path_of_.ico_file” app.py
例如:当前目录中存在app.py文件,而在当前目录中创建的“ Images”文件夹中存在“ app.ico”。因此,该命令应在下面给出。最终的可执行文件将在'dist'文件夹内生成。
pyinstaller.exe --onefile --windowed --icon = Images \ app.ico app.py
小智 5
我的解决方案是刷新 Windows 资源管理器的图标缓存
对于 Windows 10:在 Windows 运行中输入“ie4uinit.exe -show”
链接: https ://superuser.com/questions/499078/refresh-icon-cache-without-rebooting
| 归档时间: |
|
| 查看次数: |
62089 次 |
| 最近记录: |