“pip” is a default package manager for python packages/modules.
You can install pip using the following command:
sudo apt install python3-pip
The pip3 binary in installed in /usr/bin folder.
Check the pip version:
pip3 --version
or
python3 -m pip --version
You can upgrade “pip” using the following command:
sudo -H python3 -m pip install --upgrade pip
The table below lists some commonly used of pip command:
Command | Description |
---|---|
python3 -m pip –help | Display pip help |
python3 -m pip list | Lists the installed packages |
python3 -m pip list -v | Lists the installed packages along with the install path |
python3 -m pip search oauth | Searches for packages with “oauth” string |
python3 -m pip install pandas | Installs the latest version of the package “pandas” |
python3 -m pip show pandas | Shows the details of the installed package pandas |
python3 -m pip uninstall pandas | Uninstalls the package pandas |
pip freeze | Displays the lists of packages installed along with it’s version in the format: [package_name_1]==[version] [package_name_2]==[version] |