Home Python How to Install Python PIP in Linux

How to Install Python PIP in Linux

PIP is simply a Python Package Installer, which is used to retrieve and install Python-related packages from indexes such as the Python Package Index.

Python programming language continues to make a name for itself in the Linux operating system ecosystem due to the following obvious reasons:

  • Python is easy to learn due to its simple structure.
  • Python is a highly invested programming language in the field of data science.
  • The versatile nature of Python programming language makes it adaptable to numerous platforms.
  • The Python demand in the job market continues to grow.
  • It has numerous libraries.
  • Python programming language has countless learning resources applicable to both newbies and advanced Python learners.

[ You might also like: How to Run Python Script at Startup in Ubuntu ]

With that said, this article is here to walk us through the installation of PIP on various Linux distributions.

Installing Python in Linux Systems

The first step is to make sure that we have Python3 installed on our Linux systems, which comes preinstalled on most of the Linux distributions.

You can simply verify the installation of the Python version on your system by running the following commands on your terminal.

$ python3 -V 
OR
$ python -V

If Python is not installed, you can install it on your Linux distribution as shown.

$ sudo apt install python3         [On Debian, Ubuntu and Mint]
$ sudo yum install python3         [On RHEL/CentOS/Fedora and Rocky Linux/AlmaLinux]
$ sudo emerge -a dev-lang/python   [On Gentoo Linux]
$ sudo apk add python3             [On Alpine Linux]
$ sudo pacman -S python3           [On Arch Linux]
$ sudo zypper install python3      [On OpenSUSE]    

Installing Python PIP in Linux Systems

Now that we have Python installed on our Linux systems, it’s time to install its package installer which will enable us to fetch and install Python-related packages and libraries to use on our various projects.

The surest approach to installing PIP on any Linux distribution is via the package manager as shown.

$ sudo apt install python3-pip         [On Debian, Ubuntu and Mint]
$ sudo yum install python3-pip         [On RHEL/CentOS/Fedora and Rocky Linux/AlmaLinux]
$ sudo emerge -a dev-lang/pip          [On Gentoo Linux]
$ sudo apk add py3-pip                 [On Alpine Linux]
$ sudo pacman -S python-pip            [On Arch Linux]
$ sudo zypper install python3-pip      [On OpenSUSE]    

Once installed, you can check the installed PIP version:

$ pip3 --version

Install Python Packages via PIP in Linux

To install a Python package via PIP, we will adhere to the following command:

$ pip3 install packageName

To uninstall a Python package via PIP, use.

$ pip3 uninstall packageName

To search a Python package via PIP, use.

$ pip3 search packageName

For a complete PIP user guide, run the command:

$ pip3 --help

We have successfully demonstrated how to install and use PIP on any Linux distribution. Feel free to leave a comment or feedback.

Ravi Saive
I am an Experienced GNU/Linux expert and a full-stack software developer with over a decade in the field of Linux and Open Source technologies. Founder of TecMint.com, LinuxShellTips.com, and Fossmint.com. Over 150+ million people visited my websites.

Each tutorial at UbuntuMint is created by a team of experienced writers so that it meets our high-quality standards.

Was this article helpful? Please add a comment to show your appreciation and support.

Got something to say? Join the discussion.

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published or shared. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.