Ich habe Python3.5 mit einer 64-Bit-Maschine. Ich habe Projekt mit mehreren .py-Dateien und es gibt eine Hauptdatei, die den gesamten Code unter Verwendung anderer .py-Datei in demselben Verzeichnis ausführt. Ich möchte es in .exe-Datei konvertieren, so dass ich den Code auf Systemen, in denen nicht Python installiert ist, kann. Pyinstaller ist eine Option, die ich gesucht und installiert habe, aber irgendwie, wenn ich den Befehl ausführenMachen Sie eine EXE-Datei aus Python-Skripten mit pyinstaller
pyinstaller --onefile main.py
in den Eingabeaufforderungsfenstern. Es gibt
failed to create process.
Ich nicht, ob ich es falsch verwende oder es nicht kompatibel ist. Aber ich wurde mit Sicherheit richtig installiert. Irgendwelche Vorschläge, um es zum Laufen zu bringen oder wie kann ich meinen Code auf einfache Weise für alle Systeme ausführbar machen? Dank
So, nach quotes problem Korrektur betreibe ich den Befehl erneut ein, und es gab eine riesige Liste von Fehler, die ich erkenne nicht einmal :(Ich bin ein Teil dieser Fehler für die Referenz einfügen.
485 INFO: PyInstaller: 3.2
485 INFO: Python: 3.5.2
485 INFO: Platform: Windows-10-10.0.14393-SP0
501 INFO: wrote C:\Users\***********\PycharmProjects\MyfirstProject\ErrorCorrection.spec
501 INFO: UPX is not available.
523 INFO: Extending PYTHONPATH with paths
['C:\\Users\\***********\\PycharmProjects\\MyfirstProject',
'C:\\Users\\***********\\PycharmProjects\\MyfirstProject']
523 INFO: checking Analysis
523 INFO: Building Analysis because out00-Analysis.toc is non existent
523 INFO: Initializing module dependency graph...
538 INFO: Initializing module graph hooks...
538 INFO: Analyzing base_library.zip ...
9993 INFO: running Analysis out00-Analysis.toc
10282 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\users\***********\appdata\local\programs\python\python35\python.exe
10367 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\users\***********\appdata\local\programs\python\python35\python.exe
10483 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\users\***********\appdata\local\programs\python\python35\python.exe
10551 WARNING: lib not found: api-ms-win-crt-locale-l1-1-0.dll dependency of c:\users\***********\appdata\local\programs\python\python35\python.exe
10635 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\users\***********\appdata\local\programs\python\python35\python.exe
10852 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\users\***********\appdata\local\programs\python\python35\VCRUNTIME140.dll
10914 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of c:\users\***********\appdata\local\programs\python\python35\VCRUNTIME140.dll
10999 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\users\***********\appdata\local\programs\python\python35\VCRUNTIME140.dll
11083 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\users\***********\appdata\local\programs\python\python35\VCRUNTIME140.dll
11152 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\users\***********\appdata\local\programs\python\python35\VCRUNTIME140.dll
12518 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\users\***********\appdata\local\programs\python\python35\python35.dll
12603 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of c:\users\***********\appdata\local\programs\python\python35\python35.dll
12672 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\users\***********\appdata\local\programs\python\python35\python35.dll
12741 WARNING: lib not found: api-ms-win-crt-process-l1-1-0.dll dependency of c:\users\***********\appdata\local\programs\python\python35\python35.dll
12839 WARNING: lib not found: api-ms-win-crt-environment-l1-1-0.dll dependency of c:\users\***********\appdata\local\programs\python\python35\python35.dll
12904 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\users\***********\appdata\local\programs\python\python35\python35.dll
12989 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\users\***********\appdata\local\programs\python\python35\python35.dll
13058 WARNING: lib not found: api-ms-win-crt-conio-l1-1-0.dll dependency of c:\users\***********\appdata\local\programs\python\python35\python35.dll
13174 WARNING: lib not found: api-ms-win-crt-filesystem-l1-1-0.dll dependency of c:\users\***********\appdata\local\programs\python\python35\python35.dll
13258 WARNING: lib not found: api-ms-win-crt-locale-l1-1-0.dll dependency of c:\users\***********\appdata\local\programs\python\python35\python35.dll
13339 WARNING: lib not found: api-ms-win-crt-time-l1-1-0.dll dependency of c:\users\***********\appdata\local\programs\python\python35\python35.dll
13405 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\users\***********\appdata\local\programs\python\python35\python35.dll
und schließlich nach der riesigen Liste von Fehlern heißt es:
pywintypes.error: (5, 'EndUpdateResource', 'Access is denied.')
Sie py2exe versucht haben.? Sie können es hier http://www.py2exe.org/ überprüfen und wenn Sie Fragen haben, werde ich Ihnen gerne helfen. – zipa
Ich habe py2exe installiert und das ausgeführt, aber es sagt, es erfordert Python 2.7. – muazfaiz
Jetzt sehe ich das :) Wie hast du 'pyinstaller' installiert, da es' pip' Probleme zu haben scheint? Wenn ja, könnte hier Ihre Lösung sein http://stackoverflow.com/questions/31808180/installing-pyinstaller-via-pip-leads-to-failed-to-create-process – zipa