Reputation: 8001
I am trying to create a console based exe using pyinstaller using the following command.
pyinstaller --onefile --console -i icon/app.ico main.py
or
pyinstaller --onefile --console --icon=./icon/app.ico main.py
Pyinstaller creates the exe but it does not embed the icon which I have provided. My icon file name is app.ico and is located inside a folder called icon. Please help about how to do it.
Upvotes: 1
Views: 759
Reputation: 8001
Actually, it works, I mean this command pyinstaller --onefile --console -i icon/app.ico main.py
works. There is a problem with icon cache, that is why it was not properly reflecting. Once exe is created, copy the exe file to a different location, it works and you can see the icon in the exe.
Upvotes: 1