Kali Linux (Debian) can't install pip.py

37,218

Solution 1

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

install this as a 'py' file. Go to Linux terminal type in

root# python get-pip.py 

Assuming downloaded file is located in 'root'

Solution 2

u/jelmer is correct, your /etc/apt/sources.list needs two more lines. Open the sources file and add these two lines

deb-src http://http.kali.org/kali kali main non-free contrib
deb-src http://security.kali.org/kali-security kali/updates main contrib non-free

afterwards open your terminal run

apt-get update

Pip should install easily with

apt-get install python-pip
Share:
37,218
Muhammad Suleman
Author by

Muhammad Suleman

An Enthusiastic Security Consultant, Penetration Tester and trainer! here to find help!:P

Updated on November 27, 2022

Comments

  • Muhammad Suleman
    Muhammad Suleman over 1 year

    I am trying to install 'python-pip', on kali linux (debian derived distribution), using the command below:

        apt-get install python-pip
        Reading package lists... Done
        Building dependency tree       
        Reading state information... Done
        E: Unable to locate package python-pip
    

    I am getting above error.

    Any help?

    • GoBusto
      GoBusto about 9 years
      python-pip is a valid package name, so what you've typed should work - check your sources.list to make sure that you're getting packages from the right place and run apt-get update to see if that helps. This really belongs on UNIX & Linux, though.
    • Muhammad Suleman
      Muhammad Suleman about 9 years
      Newbee here, how to check sources.list? @GoBusto
    • GoBusto
      GoBusto about 9 years
      You can find it in /etc/apt/sources.list and can view/edit it with any text editor. See the Debian Wiki for more information. Also, this may be obvious, but are you running apt-get as root?
    • Muhammad Suleman
      Muhammad Suleman about 9 years
      It has only one source & that is ## Security updates deb security.kali.org/kali-security kali/updates main contrib non-free I don't believe its the correct one! @GoBusto
    • jelmer
      jelmer about 9 years
      You'll need more lines than just that - that repository would only contain security updates.