Pyinstaller设置图标 [英] Pyinstaller setting icon
问题描述
我使用以下命令:
pyinstaller.exe --icon=test.ico -F --noconsole test.py
所有图标都不会更改为test.ico
All icons do not change to test.ico
某些图标保持默认(pyinstaller)图标...
Some icons remain default(pyinstaller) icon...
为什么?
所有图标更改操作系统 - > windows 7 32bit,windows 7 64bit(make exe file OS)
all icon change OS -> windows 7 32bit, windows 7 64bit(make exe file OS)
保持默认图标OS - > windows 7 64bit(其他PC)
remain default icon OS -> windows 7 64bit(other 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 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屋!