lancer_correctement_python
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédente | Prochaine révisionLes deux révisions suivantes | ||
lancer_correctement_python [2021/02/24 17:46] – [Ce qu'il faut retenir par cœur] serge | lancer_correctement_python [2021/02/24 17:54] – [Ce qu'il faut retenir par cœur] serge | ||
---|---|---|---|
Ligne 30: | Ligne 30: | ||
* **[[https:// | * **[[https:// | ||
=====Ce qu'il faut retenir par cœur===== | =====Ce qu'il faut retenir par cœur===== | ||
+ | |||
+ | ====Installer un package==== | ||
python3.7 -m pip install black --user | python3.7 -m pip install black --user | ||
+ | | ||
+ | Pour lancer un script: | ||
+ | |||
python3.7 -m mon_fichier.py | python3.7 -m mon_fichier.py | ||
+ | ====Mettre à jour pip==== | ||
+ | | ||
+ | python3.7 -m pip install --upgrade pip | ||
+ | | ||
+ | WARNING: The scripts pip, pip3 and pip3.7 are installed in '/ | ||
+ | Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. | ||
+ | | ||
+ | Ajouter au fichier ~/.bashrc | ||
+ | |||
+ | # Pour pip, pip3 and pip3.7 | ||
+ | export PYTHONPATH=" | ||
+ | | ||
=====VirtualEnv===== | =====VirtualEnv===== | ||