Ubuntu – How to use pip3

18.04pippython3

If I try to use pip3 I see:

$ pip3 --version

Command 'pip3' not found, but can be installed with:

sudo apt install python3-pip

So I run:

$ sudo apt install python3-pip
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python3-pip is already the newest version (9.0.1-2.3~ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

Then:

$ pip3 --version

Command 'pip3' not found, but can be installed with:

sudo apt install python3-pip

Are the instructions just wrong?

Best Answer

I fixed it following the instructions from this solution to Unable to correctly install pip3 using apt-get:

Uninstall pip3 using

sudo apt-get remove python3-pip

Delete the directory

 $HOME/.local/lib/python3.6/site-packages  # (python3.6 instead of 3.5)

Reinstall pip3 using apt-get

sudo apt-get install python3-pip
Related Question