
Python 3’s Pip is often known as pip3. The good news is that Ubuntu 18.04/20.04/22.04 comes with Python 3 pre-installed. Nonetheless, you’ll have to install pip3 yourself. Here are the instructions to follow:
- Launch the terminal.
- Use the command below to refresh the package list of the repository:
$ sudo apt update
- To install pip for Python 3 and all its dependencies, type the following command:
$ sudo apt install python3-pip

- To confirm that the installation was successful, print the version number of pip by running the following command:
$ pip3 --version

- To update pip to the latest version, execute the following command:
$ sudo pip3 install --upgrade pip

How to Install a Pip Package
With pip installed on your Ubuntu machine, you can begin installing Python packages available in the Python Package Index (PyPI). You can then use a variety of commands to manage these packages with pip.
Kindly note that the commands to use will depend on the Python version installed on your system. The commands presented below are suitable for use with Python 3.
To install a package, execute the following command:
$ pip3 install <package name>
For example, here’s how to install
NumPy is the fundamental package for scientific computing with Python – on a machine running Python 3:
$ pip3 install numpy
If you want to install a specific version of a package using pip, indicate the version number in the command. For instance, to install Numpy 1.23.0, run this command:
$ pip3 install numpy==1.23.0

To upgrade an installed package to the latest version available on the Python Package Index (PyPI), execute this command:
$ pip3 install <package_name> --upgrade
For instance, to update Numpy on a computer running Python 3, execute the following command:
$ pip3 install numpy --upgrade
Occasionally, you may need to uninstall pip packages that you’ve installed. To remove a package in Python 3, execute the following command:

$ pip3 uninstall <package_name>
What Is pip and what does It do?
Pip is a package management system for Python software that stands for “pip installs packages”. It’s a command-line interface for managing packages and is used to install and manage Python packages from the command line or a terminal program after it’s been installed.
A Python package is a collection of Python modules. They contain Python definitions and statements, usually including runnable code.
Pip simplifies the task of installing and handling Python modules and packages by connecting to the Python Package Index (PyPI), which is the official third-party software repository for Python. By accessing PyPI, pip makes it easier to find, install, and manage Python packages without manual downloading or configuration.
When a user installs Python packages using pip, the package manager will resolve all the dependencies and check whether the chosen software packages are already installed. If pip finds that the software hasn’t been installed, it will install them on the machine.
Conclusion
Pip
is a helpful command line package manager and installer for Ubuntu. Using various commands, pip allows you to manage Python software packages from the Ubuntu terminal.
In this tutorial, you have learned how to install pip on Ubuntu machines running Python 3. We have also covered how to use pip to install Python packages, upgrade them to the latest version, and remove them from your system. With these skills, you can now manage Python packages easily and efficiently using the command line.
We hope you’ve found this article helpful and wish you the best of luck in your future projects with pip on Ubuntu.