start:python:pointexe
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
start:python:pointexe [2025/04/08 14:44] – [Exemple avec un fichier calculatrice.py] admin | start:python:pointexe [2025/04/08 15:04] (Version actuelle) – [le programme calculatrice.exe] admin | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | ======== Python en exe ======== | + | ======== Python en .exe ======== |
====== installer pyinstaller ====== | ====== installer pyinstaller ====== | ||
Ligne 7: | Ligne 7: | ||
==Windows== | ==Windows== | ||
- | PyInstaller fonctionne sous Windows | + | PyInstaller fonctionne sous Windows |
==macOS== | ==macOS== | ||
Ligne 25: | Ligne 25: | ||
pip install pyinstaller | pip install pyinstaller | ||
- | | ||
====Utilisation de PyInstaller==== | ====Utilisation de PyInstaller==== | ||
+ | |||
+ | [[https:// | ||
La syntaxe de la pyinstallercommande est : | La syntaxe de la pyinstallercommande est : | ||
Ligne 49: | Ligne 50: | ||
==== Exemple avec un fichier calculatrice.py ==== | ==== Exemple avec un fichier calculatrice.py ==== | ||
+ | |||
+ | {{ : | ||
Dans la console windows 11 : | Dans la console windows 11 : | ||
- | < | + | < |
</ | </ | ||
- | cd C:\users\jaune1\appdata\local\packages\pythonsoftwarefoundation.python.3.13_qbz5n2kfra8p0\localcache\local-packages\python313\Scripts | + | cd C:\users\nom_utilisateur\appdata\local\packages\pythonsoftwarefoundation.python.3.13_qbz5n2kfra8p0\localcache\local-packages\python313\Scripts |
- | < | + | < |
.\pyinstaller.exe --onefile -w calculatrice.py | .\pyinstaller.exe --onefile -w calculatrice.py | ||
- | **explications** | + | **Explications** |
+ | |||
.\pyinstaller.exe | .\pyinstaller.exe | ||
- | --onfile | + | |
- | -w : on enleve l'affiche | + | --onfile |
+ | |||
+ | -w : on enleve l'affichage | ||
calculatrice.py | calculatrice.py | ||
- | < | + | < |
</ | </ | ||
+ | |||
+ | == le programme calculatrice.exe == | ||
+ | {{ : | ||
+ | |||
+ | |||
/home/chanteri/www/fablab37110/data/attic/start/python/pointexe.1744116276.txt.gz · Dernière modification : 2025/04/08 14:44 de admin