skip to Main Content

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


  1. Chosen as BEST ANSWER

    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.


  2. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search