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

Pyinstaller setting icons don't change

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

When I use the command:

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

All icons do not change to test.ico. Some icons remain as the pyinstaller's default icon.

Why?

All icon change in

  • windows 7 32bit
  • windows 7 64bit (make an exe file OS)

Some remain default

  • windows 7 64bit (other PC)
Questioner
Somputer
Viewed
0
J. Saw 2015-11-06 09:50:33

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

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.

The information here was found at this site: https://mborgerson.com/creating-an-executable-from-a-python-script