Install pip on Ubuntu 20.04

Install pip on Ubuntu 20.04

The pip is a package manager for Python that allows to download and install various packages from Python Package Index (PyPI) repository.

This tutorial demonstrates how to install pip on Ubuntu 20.04.

Install pip

Download script:

wget -q

Execute downloaded script to install pip for Python 3:

sudo python3

Once installation is complete, we can check pip version:

pip3 --version

The script is no longer needed, remove it:

rm -rf

Testing pip

The pip3 install command can be used to install packages. For example, the following command installs pytz package:

sudo pip3 install pytz

The following command allows to get a list of installed packages:

pip3 list

Uninstall pip

If you want to completely remove pip and related dependencies, run the following command:

sudo pip3 uninstall -y pip wheel

Remove pip cache:

sudo rm -rf /root/.cache/pip
rm -rf ~/.cache/pip

Leave a Comment

Cancel reply

Your email address will not be published.