Outils pour utilisateurs

Outils du site


dev:python:generer-binaire-autonome

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
dev:python:generer-binaire-autonome [2018/04/29 21:05] – créée yoanndev:python:generer-binaire-autonome [2021/02/01 21:51] (Version actuelle) – modification externe 127.0.0.1
Ligne 9: Ligne 9:
   * Nuitka (jusqu'à Python 3.4)   * Nuitka (jusqu'à Python 3.4)
  
 +===== pyinstaller =====
 +
 +Installer la bibliothèque pyinstaller:
 +
 +<code batch>
 +pip install pyinstaller
 +</code>
 +
 +Créer le binaire
 +<code batch>
 +pyinstaller.exe --clean --onefile mon_script.py
 +</code>
 +
 +Les principales options de pyinstaller sont décrite a l'URL https://pyinstaller.readthedocs.io/en/stable/usage.html#options
 +
 +Pour un script s’exécutant en console:
 +
 +<code batch>
 +pyinstaller.exe --clean --nowindow --onefile mon_script.py
 +</code>
 +
 +le fichier exécutable produit est placé par défaut dans le dossier **.\dist**
  
 ===== Références ===== ===== Références =====
  
   * https://stackoverflow.com/questions/5458048/how-to-make-a-python-script-standalone-executable-to-run-without-any-dependency#5458807   * https://stackoverflow.com/questions/5458048/how-to-make-a-python-script-standalone-executable-to-run-without-any-dependency#5458807
 +  * https://pyinstaller.readthedocs.io/en/stable/usage.html#options
  
dev/python/generer-binaire-autonome.1525035903.txt.gz · Dernière modification : 2021/02/01 21:51 (modification externe)