====== Pip ====== * [[https://pip.pypa.io/en/stable/user_guide/#installing-packages|Source]] ==== Lister les paquets installés ==== La syntaxe est la même que celle du fichier ''requirements.txt'': pip3 freeze ==== Installer les paquets ==== sudo pip3 install -r requirements.txt Il est possible d'installer le paquet correspondant à une PR particulière sur GitHub ([[https://pip.pypa.io/en/stable/cli/pip_install/#vcs-support|source]]): pip install git+https://github.com/django-crispy-forms/django-crispy-forms.git@refs/pull/1101/head ==== Mettre à jour tous les paquets ==== pip install -U $(pip freeze | cut -d '=' -f 1) ==== Voir les dépendances des paquets ==== [[https://stackoverflow.com/questions/9232568/identifying-the-dependency-relationship-for-python-packages-installed-with-pip|Source]] cut -d'=' -f1 requirements.txt | xargs pip show ==== Indique un dossier temporaire ==== Lorsque pip rencontre des problèmes de disque plein: TMPDIR=/dossier/avec/de/la/place/ pip install --build /dossier/avec/de/la/place/ --no-cache-dir truc [[https://github.com/pypa/pip/issues/5816|Source]] ==== Corrige l'erreur avec bdist_wheel ==== Si l'erreur ''error: invalid command 'bdist_wheel''' apparaît ([[https://stackoverflow.com/questions/34819221/why-is-python-setup-py-saying-invalid-command-bdist-wheel-on-travis-ci|source]]): pip install wheel ==== Savoir où un paquet est installé ==== [[https://stackoverflow.com/questions/29980798/where-does-pip-install-its-packages|Source]] pip show $paquet