Seite 1 von 1
Pythonprogramm auf einem PC ohne Pythoninstallation
Verfasst: Dienstag 7. März 2017, 22:38
von Raininger
Hallo Freunde,
sicher ist das eine einfache Frage, wenn man sich auskennt: Ich möchte ein Pythonprogramm, welches ich auf einem Datenträger mitgebracht habe, bei Freunden laufen lassen. Dafür möchte ich aber vorher nicht erst Python auf diesem Fremd-PC (Windows 10) installieren. Wie mache ich das?
Vielen Dank im Voraus. Grüße, Raininger
Re: Pythonprogramm auf einem PC ohne Pythoninstallation
Verfasst: Dienstag 7. März 2017, 23:59
von BlackJack
Python auch auf dem Datenträger mitbringen. Habe damit selbst keine Erfahrung, aber das hier sollte helfen:
https://winpython.github.io/
Zitat:
„WinPython lives entirely in its own directory, without any OS installation“
Re: Pythonprogramm auf einem PC ohne Pythoninstallation
Verfasst: Mittwoch 8. März 2017, 01:39
von Axel-Erfurt
Müsste mit
pyinstaller funktionieren
Zitat:
Packaging of Python programs into standard executables, that work on computers without Python installed.
Multiplatform: works under
Windows (32-bit and 64-bit),
Linux (32-bit and 64-bit),
Mac OS X (32-bit and 64-bit),
contributed suppport for FreeBSD, Solaris and AIX.
Wenn Du die Option
--onefile verwendest ergibt es eine einzelne Datei, ansonsten einen Ordner mit dem Programm und den nötigen Dateien.
Wobei die mit
--onefile erstelle Datei langsamer startet als die Version mit Ordner.
in Linux z.B. im Terminal:
Code: Alles auswählen
cd '/Odner/wo du es speichern möchtest/'
pyinstaller '/Pfad/zu/Python Datei/Datei.py' --onefile