How to install Python PIP on Ubuntu 22.04 – The Python package manager

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

Hello, friends. In this short, but productive post, you will learn how to install PIP on Ubuntu 22.04 | Linux Mint 21 which is a package gesture for Python.

Introduction

So, according to the official PIP documentation,

pip is the package installer for Python. You can use it to install packages from the Python package index and other indexes.

That is, with PIP you can install, uninstall, and update packages made with Python. These packages can be entire applications or simple libraries.

Needless to say that PIP is open source, and we can install it on almost any desktop operating system.

Let’s go for it.

Install Python Pip on Ubuntu 22.04 | Linux Mint 21

As expected, Pip is present in the official Ubuntu and Linux Mint repositories, making the process faster.

So, first, open a terminal and update the whole system

sudo apt update
sudo apt upgrade

Thereafter, install both the Python development libraries and PIP.

sudo apt install python3-dev python3-pip
Install python PIP on Ubuntu 22.04
Install python PIP on Ubuntu 22.04

Then, verify the installed version as follows:

pip3 --version

You will get an output similar to this

pip 22.0.2 from /usr/lib/python3/dist-packages/pip (python 3.10)

Before using PIP…

Before using it, you should do two things, the first is to update it to its latest version. To do this, run.

pip3 install pip -U

Now if you show again the installed version

pip3 --version

Sample Output

Successfully installed pip-22.2.2

As you can see, there is an update in the version number.

The second thing you have to do is to add the /home/[your-user]/.local/bin directory to the PATH. It is in this directory that PIP stores the binaries of downloaded applications or Python libraries.

export PATH=$PATH:/home/angelo/.local/bin

If you want additional information about how to add a directory to the PATH, read this post.

And with this, you can use Pip without problems. For example, to install a package.

pip3 install <package>

Conclusion

In this post, you learned how to install PIP on Ubuntu 22.04 that tool will be used later and especially by yourself in python projects.

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"
Angelo
Angelo
I am Angelo. A systems engineer passionate about Linux and all open-source software. Although here I'm just another member of the family.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook