No apt pip-is-pip3 package

Ubuntu 20.04 dropped python2 and you can make the python command call the installed python 3.x by

sudo apt install python-is-python3

Additionally I installed

sudo apt install python3-pip

Now I can call python (→ Python 3.8.2), but for pip I need to append the 3. An aquivalent pip-is-pip3 package seems not to be available.

What is the recommended way to let pip work as pip3?

Make a softlink? Or never do it, but venv and only pip there?

5

1 Answer

Not much of an expert, but I think you can add this to the end of your .bashrc file in your home directory

alias pip=pip3

You can also configure update-alternatives by running this (again, might be different) :

sudo update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1

If that doesn't work, well, I must warn you, this may be dangerous, but you can copy the content of /usr/bin/pip3 and paste it into /usr/bin/pip

Doing so should make it so when you run pip, it will run pip3 intstead.

Another dangerous way of doing things is just editing the content of /usr/bin/pip to just have it run

#!/bin/bash
pip3
2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like