pythonexepyinstallerpublishing

No error while adding icon to EXE file with Pyinstaller Spec,still icon is not showing


I am new to pyinstaller. While I was compiling my exe file I got no error. Output at compilation time

I have added logo path to spec file.

exe = EXE(pyz,
      a.scripts,
      a.binaries,
      Tree('exp','exp'),
      a.zipfiles,
      a.datas,
      name='Screen2text',
      debug=False,
      bootloader_ignore_signals=False,
      strip=False,
      upx=True,
      upx_exclude=[],
      runtime_tmpdir=None,
      console=False,
      icon=r'D:\backup\logo.ico')

But after compiling,I can't see that logo on my exe file.Size of my logo file is 423KB. Am I missing something?


Solution

  • Actually the icon has changed, but the Windows File Explorer cached the old icon and does not display the new one.
    Things to do: Just rename the file, File explorer will update the icon and you will sure the new icon has set or not.

    screenshot