PIP is a recursive acronym that stands for “PIP Installs Python” (Confusing, right ?). PIP is basically a package manager to manage python-based applications & packages. PIP3 is basically used with Python3, is used to install, remove or upgrade many of the python3 packages available in a repository known as Python Package Index or PyPI, in short.
Recommended Read: Install SNAP on Ubuntu & CentOS/RHEL
Also Read: Ultimate guide to install PYTHON from source
Think PIP as YUM or APT for Python packages. In this tutorial, we will learn to install PIP3 on Ubuntu machines. Let’s discuss pre-requisites first.
Pre-requisites
We should have Python installed on our system, which most of the Linux systems already have installed by default. But we can install python 3 on Ubuntu with the following command as well,
$ sudo apt-get update
$ sudo apt-get install python3
You can also refer to our detailed tutorial here for python 3 installation. Now next step would be to discuss how to install PIP on Ubuntu.
Install PIP3 on Ubuntu
Installation is pretty simple & straight forward for installing pip3 on Ubuntu. We can install PIP3 using the following commands,
$ sudo apt-get update && sudo apt-get upgrade -y
$ sudo apt-get install python3-pip
Once PIP is installed, we can use it to manage packages. Let’s discuss some commands for using Python PIP.
PIP3 commands
To install a package using PIP, use the following command,
$ pip3 install package_name
To install a number of packages, we can create a file & mention all the packages we need to have to install ed on our system. Then run the following command to install all the packages,
$ pip3 install -r packages.txt
To remove a package, run
$ pip3 uninstall package_name
Command to only download a package & not install it is,
$ pip3 download package_name
To list installed packages,
$ pip3 list
For a complete list of options that can be used with PIP command, run
$ pip3 –help
That’s it for this tutorial on how to install PIP3 on Ubuntu. Please feel free to send in any questions or queries using the comment box below.