Ich verwende PyInstaller (V3.1.1), um mein Programm unter Windows 7 64-Bit zu kompilieren. Dies funktioniert gut:PyInstaller enthält kein Symbol
pyinstaller --onefile --version=version.txt program.py
Dies schlägt fehl:
pyinstaller --onefile --version=version.txt --icon=icon.ico program.py
Der Fehler ist das gleiche wie wenn ich laufe:
>>> import win32api
>>> src = "C:\\path\\to\\icon.ico"
>>> win32api.LoadLibraryEx(src, 0, 2)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
pywintypes.error: (193, 'LoadLibraryEx', '%1 is not a valid Win32 application.')
ich festgestellt habe, dass ich 32-Bit-Python haben (3.5 .1) installiert:
>>> import platform
>>> platform.architecture()
('32bit', 'WindowsPE')
Alle anderen Die gelösten Fragen dazu scheinen durch die Installation von 32-Bit-Python gelöst zu werden. Alle Module wurden mit pip installiert.
Vielen Dank für die Lösung. Du hast viel Zeit gespart! – Maham