Pyinstaller setting icons don't change

前端 未结 6 2133
栀梦
栀梦 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:25

    The below command can set the icon on an executable file.

    Remember the ".ico" file should present in the place of the path given in "Path_of_.ico_file".

    pyinstaller.exe --onefile --windowed --icon="Path_of_.ico_file" app.py
    

    For example:

    If the app.py file is present in the current directory and app.ico is present inside the Images folder within the current directory.

    Then the command should be as below. The final executable file will be generated inside the dist folder

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

提交回复
热议问题