“E: Unable to locate package python3-pip” in Debian 10

Viewed 4969

For installing pip3 I am following apt update process. But I am getting output in terminal:

$ sudo apt-get update 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package python3-pip

Tried all available solutions on stackoverflow. Please suggest any solutions.

2 Answers

Sometimes the sources.list file is not configured properly, so if none of solutions work than try this: Type in terminal, gedit etc/apt/sources.list. A file will open, check if these given lines are present or not in that file:

deb http://deb.debian.org/debian buster main
deb-src http://deb.debian.org/debian buster main

deb http://deb.debian.org/debian-security/ buster/updates main
deb-src http://deb.debian.org/debian-security/ buster/updates main

deb http://deb.debian.org/debian buster-updates main
deb-src http://deb.debian.org/debian buster-updates main

In my case these were missing, this means the apt-get command had no mirrors configured to pull and update packages. These lines are the links to Debian repositories from where packages are pulled. Copy and paste these lines into that file and save and close it. Now run sudo apt-get update and than run sudo apt-get upgrade. Once process finishes run sudo apt-get install -y python3-pip. This will install pip3 without any error.

Please run an update and upgrade,

sudo apt update && sudo apt upgrade 

Hopefully, this will fix the issue. if this doesn't work you can always update the source list manually.

Related