Code: Alles auswählen
pyinstaller --onefile dein_programm.py --icon dein_icon
Wenn ich diesen Befehl eingebe, bekomme ich Folgene Ausgabe in der Konsole:
78 INFO: PyInstaller: 3.1.1
78 INFO: Python: 3.4.0
78 INFO: Platform: Windows-8-6.2.9200
78 INFO: wrote C:\Users\mytoo\main.spec
93 INFO: UPX is not available.
93 INFO: Extending PYTHONPATH with paths
['C:\\Users\\mytoo\\Desktop\\Modding-Cube-Launcher', 'C:\\Users\\mytoo']
93 INFO: checking Analysis
125 INFO: Building because D:\Programme\Python\lib\site-packages\PyInstaller\loader\rthooks\pyi_rth__tkinter.py changed
125 INFO: Initializing module dependency graph...
125 INFO: Initializing module graph hooks...
140 INFO: Analyzing base_library.zip ...
2171 INFO: Processing pre-find module path hook distutils
3547 INFO: running Analysis out00-Analysis.toc
3656 INFO: Analyzing C:\Users\mytoo\Desktop\Modding-Cube-Launcher\main.py
5531 INFO: Looking for import hooks ...
5547 INFO: Processing hook hook-requests.py
5547 INFO: Processing hook hook-_tkinter.py
5703 INFO: checking Tree
5734 INFO: checking Tree
5848 INFO: Processing hook hook-PyQt5.QtGui.py
6243 INFO: Processing hook hook-PyQt5.py
6258 INFO: Processing hook hook-encodings.py
6274 INFO: Processing hook hook-PyQt5.QtWebKitWidgets.py
6274 INFO: Processing hook hook-PyQt5.QtNetwork.py
6352 INFO: Processing hook hook-xml.py
6415 INFO: Processing hook hook-PyQt5.QtWidgets.py
6415 INFO: Processing hook hook-distutils.py
6415 INFO: Processing hook hook-PyQt5.Qt.py
6430 INFO: Processing hook hook-PyQt5.QtWebKit.py
6430 INFO: Processing hook hook-PyQt5.QtCore.py
6508 INFO: Processing hook hook-pydoc.py
6555 INFO: Looking for ctypes DLLs
6571 INFO: Analyzing run-time hooks ...
6571 INFO: Including run-time hook 'pyi_rth__tkinter.py'
6587 INFO: Including run-time hook 'pyi_rth_qt5.py'
6587 INFO: Including run-time hook 'pyi_rth_qt5plugins.py'
6602 INFO: Looking for dynamic libraries
8589 WARNING: Attempted to add Python module twice with different upper/lowercases: PyQt5.QtWebKitWidgets
8589 WARNING: Attempted to add Python module twice with different upper/lowercases: PyQt5.QtWebKit
8589 WARNING: Attempted to add Python module twice with different upper/lowercases: PyQt5.QtNetwork
8605 WARNING: Attempted to add Python module twice with different upper/lowercases: PyQt5.QtCore
8605 WARNING: Attempted to add Python module twice with different upper/lowercases: PyQt5.QtWidgets
8605 WARNING: Attempted to add Python module twice with different upper/lowercases: PyQt5.QtGui
8605 WARNING: Attempted to add Python module twice with different upper/lowercases: PyQt5.Qt
8605 WARNING: Attempted to add Python module twice with different upper/lowercases: PyQt5.QtPrintSupport
8620 INFO: Looking for eggs
8620 INFO: Using Python library C:\Windows\system32\python34.dll
8620 INFO: Found binding redirects:
[]
8652 INFO: Warnings written to C:\Users\mytoo\build\main\warnmain.txt
8917 INFO: checking PYZ
8917 INFO: Building because toc changed
8917 INFO: Building PYZ (ZlibArchive) C:\Users\mytoo\build\main\out00-PYZ.pyz
9480 INFO: checking PKG
9495 INFO: Building because toc changed
9495 INFO: Building PKG (CArchive) out00-PKG.pkg
30343 INFO: Bootloader D:\Programme\Python\lib\site-packages\PyInstaller\bootloader\Windows-64bit\run.exe
30343 INFO: checking EXE
30343 INFO: Building EXE because out00-EXE.toc is non existent
30358 INFO: Building EXE from out00-EXE.toc
30390 INFO: SRCPATH [('C:\\Users\\mytoo\\Desktop\\Bild\\icon.png', None)]
30390 INFO: Updating icons from C:\Users\mytoo\Desktop\Bild\icon.png to C:\Users\mytoo\AppData\Local\Temp\tmp3m59asde
Traceback (most recent call last):
File "D:\Programme\Python\Scripts\pyinstaller-script.py", line 9, in <module>
load_entry_point('PyInstaller==3.1.1', 'console_scripts', 'pyinstaller')()
File "D:\Programme\Python\lib\site-packages\PyInstaller\__main__.py", line 90, in run
run_build(pyi_config, spec_file, **vars(args))
File "D:\Programme\Python\lib\site-packages\PyInstaller\__main__.py", line 46, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "D:\Programme\Python\lib\site-packages\PyInstaller\building\build_main.py", line 755, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "D:\Programme\Python\lib\site-packages\PyInstaller\building\build_main.py", line 701, in build
exec(text, spec_namespace)
File "<string>", line 28, in <module>
File "D:\Programme\Python\lib\site-packages\PyInstaller\building\api.py", line 498, in __init__
self.__postinit__()
File "D:\Programme\Python\lib\site-packages\PyInstaller\building\datastruct.py", line 183, in __postinit__
self.assemble()
File "D:\Programme\Python\lib\site-packages\PyInstaller\building\api.py", line 586, in assemble
icon.CopyIcons(tmpnm, self.icon)
File "D:\Programme\Python\lib\site-packages\PyInstaller\utils\win32\icon.py", line 172, in CopyIcons
hsrc = win32api.LoadLibraryEx(srcpath, 0, LOAD_LIBRARY_AS_DATAFILE)
pywintypes.error: (193, 'LoadLibraryEx', '%1 ist keine zulässige Win32-Anwendung.')
Weiß jemand wie ich jetzt diesen Fehler behebe?
![Crying or Very sad :cry:](./images/smilies/icon_cry.gif)