Ubuntu 20.04: E: Unable to locate package python-pip

38,521

Solution 1

I don't believe python-pip exists anymore in 20.04, looks like it has been removed from the repositories and is removed during the upgrade from 18.04(in my case 19.10) to 20.04. Maybe the functionality of the package has been bundled with a different python package?

20.04 upgrade

Solution 2

Use pip3 instead of pip

I will assume you are using the Python3 version so you can install pip3 with

sudo apt-get install python3-pip

then you can install whatever you wanted starting with;

pip3 install

All the best :)

Solution 3

First of all try to search package

apt-cache search pip | grep python

Then

dpkg -l | grep python

to see if python is installed Finally try

python3 -m pip 
Share:
38,521

Related videos on Youtube

Toffee
Author by

Toffee

Server administrator for myself | Focused on making the internet more secure | Homelab enthusiast

Updated on September 18, 2022

Comments

  • Toffee
    Toffee over 1 year

    I have just installed Ubuntu 20.04 and I have come across an issue when trying to install pip. On my older machines running 18.04, the command ran fine and installed the package. However, when installing it on 20.04, I am getting this issue:

    toffee@theia:~$ sudo apt-get install python-pip
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    E: Unable to locate package python-pip
    

    I have the universe repo added, I have done countless reboots, updates and upgrades. Is there any way I can fix this?

  • Admin
    Admin about 4 years
    Ubuntu 20.04 dropped support for Python 2.x which was defunct since beginning of the year anyway. It comes with Python 3 out of the box, or you can install it from your repos if that's not the case, but forget about Python 2 on the latest Ubuntu, it just won't install.
  • Toffee
    Toffee about 4 years
    Sorry for the confusion, I was referring to python 2 specifically. It has been removed from the repos apparently. Thank you for the help.
  • p0rc0_r0ss0
    p0rc0_r0ss0 about 4 years
    You are welcome.
  • Toffee
    Toffee almost 4 years
    Thanks for this! The thing is the program I was trying to install required python 2 which I am just hoping gets updated to use python 3.