Pyinstaller setting icons don't change

前端 未结 6 2123
栀梦
栀梦 2020-12-04 11:14

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

6条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-04 11:38

    Here is how you can add an icon while creating an exe file from a Python file

    • open command prompt at the place where Python file exist

    • type:

      pyinstaller --onefile -i"path of icon"  path of python file
      

    Example-

    pyinstaller --onefile -i"C:\icon\Robot.ico" C:\Users\Jarvis.py

    This is the easiest way to add an icon.

提交回复
热议问题