How to install pip on Ubuntu

Written by
Date: 2020-05-20 21:05:00 00:00

Pip is a tool to manage Python modules, it lets you find, install, updated and remove packages, just like apt does for Debian.

Python Version

Ubuntu 20.04 comes with python3 installed by default, and if you are starting a new project python3 is what you have to use, phthon2 can be installed, but it is not recommended.

Install python3 pip

To install it just run this command:

sudo apt install python3-pip

When to use it

The python modules can be installed from the Ubuntu repositories, or using pip tool, it is always better to install anything from the Ubuntu repositories if you are going to install globally, otherwise you can run into incompatibility issues.

If you want to use pip it is advisable to use Python virtual environments

Once you have the virtual environment activated, you can start using pip to install python modules, otherwise it is better to use apt or yum.