Warm tip: This article is reproduced from serverfault.com, please click

python-Pyinstaller设置图标不变

(python - Pyinstaller setting icons don't change)

发布于 2015-03-27 00:05:37

当我使用命令时:

pyinstaller.exe --icon=test.ico -F --noconsole test.py

所有图标都不会更改为test.ico。某些图标仍然是pyinstaller的默认图标。

为什么?

所有图标更改

  • Windows 7的32位
  • Windows 7 64位(使exe文件成为操作系统)

有些仍然默认

  • Windows 7 64位(其他PC)
Questioner
Somputer
Viewed
11
J. Saw 2015-11-06 09:50:33

我知道这是古老的东西(不是很确定这是否是一个问题),但是在搜索之后,我成功使用了以下命令--onefile

pyinstaller.exe --onefile --windowed --icon=app.ico app.py

当我在寻找有关如何为.exe设置图标的答案时,Google引导我转到了该页面,因此也许它会对其他人有所帮助。

可在以下站点找到此处的信息:https : //mborgerson.com/creating-an-executable-from-a-python-script