Skip to content

Install pip#

Pip (Package Installer for Python) is the PyPA recommended tool for installing Python packages.

Official page:

Install pip3 for python3 (Ubuntu 20.04)#

First, install Python.


sudo apt install python3-pip

Install latest pip on GNU/Linux#

wget | sudo python

Install latest pip3 on GNU/Linux#

wget | sudo python3


There is a bug in some versions of pip that disables pip after an upgrade (pip install --upgrade pip) with the following error:

Traceback (most recent call last):
  File "/usr/bin/pip3", line 9, in <module>
    from pip import main
ImportError: cannot import name 'main'

The simplest fix found here is to run the following command to upgrade pip by installing again the latest version (use python instead for python2):

wget | sudo python3