Pyinstaller设置图标不变 [英] Pyinstaller setting icons don't change
问题描述
当我使用命令时:
pyinstaller.exe --icon=test.ico -F --noconsole test.py
所有图标都不会更改为test.ico.某些图标仍然是pyinstaller的默认图标.
All icons do not change to test.ico. Some icons remain as the pyinstaller's default icon.
为什么?
所有图标已更改
- windows 7 32bit
- Windows 7 64位(使exe文件成为操作系统)
有些仍然是默认值
- Windows 7 64位(其他PC)
推荐答案
我知道这很老了(但不完全确定这是否是个问题),但是在搜索后,我成功使用了--onefile
的此命令:
I know this is old and whatnot (and not exactly sure if it's a question), but after searching, I had success with this command for --onefile
:
pyinstaller.exe --onefile --windowed --icon=app.ico app.py
在我寻找有关如何为.exe设置图标的答案时,Google引导我转到了此页面,因此也许会对其他人有所帮助.
Google led me to this page while I was searching for an answer on how to set an icon for my .exe, so maybe it will help someone else.
在此站点上找到此处的信息: https://mborgerson .com/creating-an-executable-from-a-python-script
The information here was found at this site: https://mborgerson.com/creating-an-executable-from-a-python-script
这篇关于Pyinstaller设置图标不变的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!