I see this issue discussed elsewhere, but various suggestions haven't helped me.
I have a working script that I've successfully converted to a windows .exe.
Because I'll eventually need to add many hidden imports and data files, I'm using a spec file, which is as follows. However, for simplicity, I'll provide a stripped down version with nothing added:
block_cipher = None
a = Analysis(['my_script.py'],
pathex=[],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='my_script',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=False,
disable_windowed_traceback=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None )
app = BUNDLE(name='my_script.exe',icon=
C:\Users\MyName\Desktop\my_icon.ico',bundle_identifier=None,
info_plist={
'LSEnvironment': {
'LANG': 'de_DE.UTF-8',
'LC_CTYPE': 'de_DE.UTF-8'
}})
For some reason, I'm only getting the pyinstaller default icon.
Suggestions?