5

I have recently upgraded from Ubuntu 18.04 to 20.04 LTS. Before upgrading, I had the python-pip package installed. But after upgrading, when I try this command the terminal says:

$ sudo pip install foo
sudo: pip: command not found

I tried to update repository information and install python-pip package, but APT says that there is no package named python-pip in the repository.

5

python-pip package is no longer supported by Ubuntu as Python 2.7 is no longer supported. So forget that package. But you can still install it by issuing the following on terminal:

wget https://bootstrap.pypa.io/get-pip.py
python2 get-pip.py

As python3-pip package is supported, which provides pip3 command you can install it Python 3 with apt by:

sudo apt update
sudo apt install python3-pip
1

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.