Installateur de paquets Python - pip

Dernière mise à jour : Debian 10.6 Buster

pip (Python package Installer) est un gestionnaire de paquets Python.

Sommaire

Installation

$ python -V
Python 2.7.16

$ python3 -V
Python 3.7.3
$ sudo aptitude install python python-pip python3 python3-pip
$ pip3 --help

Usage:
pip3 <command> [options]
.....

$ pip3 --version
pip 18.1 from /usr/lib/python3/dist-packages/pip (python 3.7)

Utilisation

list
search
show
install
check
--upgrade
uninstall
$ pip3 list
Package Version
------------------- -------------
acme 0.31.0
appdirs 1.4.4
asn1crypto 0.24.0
....

$ pip3 list |grep -i mopidy
Mopidy 3.0.2
Mopidy-AudioAddict 0.2.7
Mopidy-Bookmarks 0.1.4
Mopidy-GMusic 4.0.0
Mopidy-Iris 3.52.4
Mopidy-Local 3.1.1
Mopidy-RadioNet 0.2.1
Mopidy-RadioWorld 0.1.0
Mopidy-SomaFM 2.0.0
Mopidy-TuneIn 1.0.0
$ pip3 search solaar
solaar (1.0.4) - Linux devices manager for the Logitech Unifying Receiver.
$ pip3 show solaar
Name: solaar
Version: 1.0.4
Summary: Linux devices manager for the Logitech Unifying Receiver.
Home-page: http://pwr-solaar.github.io/Solaar/
Author: Daniel Pavel
Author-email: None
License: GPLv2
Location: /usr/local/lib/python3.7/dist-packages
Requires: pyudev
Required-by:
$ pip3 install solaar
$ sudo pip3 install solaar
$ sudo pip3 check solaar
pyasn1-modules 0.2.8 has requirement pyasn1<0.5.0,>=0.4.6, but you have pyasn1 0.4.2.

$ sudo pip3 install pyasn1-modules
Requirement already satisfied: pyasn1-modules in /usr/local/lib/python3.7/dist-packages (0.2.8)
Collecting pyasn1<0.5.0,>=0.4.6 (from pyasn1-modules)
Downloading https://files.pythonhosted.org/packages/62/1e/a94a8d635fa3ce4cfc7f506003548d0a2447ae76fd5ca53932970fe3053f/pyasn1-0.4.8-py2.py3-none-any.whl (77kB)
100% |████████████████████████████████| 81kB 911kB/s
Installing collected packages: pyasn1
Found existing installation: pyasn1 0.4.2
Not uninstalling pyasn1 at /usr/lib/python3/dist-packages, outside environment /usr
Can't uninstall 'pyasn1'. No files were found to uninstall.
Successfully installed pyasn1-0.4.8

$ sudo pip3 check solaar
No broken requirements found.
$ sudo pip3 install --upgrade solaar
$ sudo pip3 uninstall solaar