How to Install Pip on Linux

Pip is a package manager used to download and install software written in Python code. In this tutorial, we will learn how to install and use pip on all of the main Linux distributions.

Installing Pip on Linux

For Debian-based distributions and Ubuntu:

$ sudo apt install python3-pip

For Red Hat, Fedora, AlmaLinux, Rocky Linux, CentOS:

$ sudo dnf install python3-pip

For Arch Linux and Manjaro:

$ sudo pacman -S python-pip

For openSUSE:

$ zypper install python3-pip

How to Use Pip on Linux

Now that we have installed pip, here are some commands to start using it:

Example 1. Searching for a package:

$ pip3 search package_name

Example 2. Installing a package:

$ pip3 install package_name

Example 3. Removing a package:

$ pip3 uninstall package_name

Example 4. Showing information about a package:

$ pip3 show packge_name

Example 5. Listing the installed packages on our system:

$ pip3 list

Example 6. Use the help command to show more about how to use pip:

$ pip3 help

Leave a Comment

Your email address will not be published. Required fields are marked *