Installing pip2, apt install python-pip no longer works?

So I had to completely rebuild my os today, and Parrot has a weird relationship with pip modules - pip3 is always installed by pip2 is not. Usually I would just go:

apt install python-pip 

but now it's throwing errors. According to this link here: https://bugs.launchpad.net/ubuntu/+source/python-pip/+bug/1870878 it seems like python-pip is no longer supported. What should I do to get around this, doesn't get-pip.py not work with system installs of python?

LMAY75
Always happy to help, DM me if you need anything!
Link to Profile

Comments

  • edited October 18

    what errors you getting and what kernal is it running ? And does it come with python2 already installed?

    My parrot vm has python-pip and python3-pip installed automatically. If you give me your version i can try to replicate your issue.

    might check this out:
    https://linuxize.com/post/how-to-install-pip-on-ubuntu-20.04/

    elseif

  • edited October 18

    Type your comment> @elseif said:

    what errors you getting and what kernal is it running ? And does it come with python2 already installed?

    My parrot vm has python-pip and python3-pip installed automatically. If you give me your version i can try to replicate your issue.

    might check this out:
    https://linuxize.com/post/how-to-install-pip-on-ubuntu-20.04/

    Uhh I think 4.10 is the latest version, but every time I have installed it I have been left with a different python configuration so who knows what you will get :lol:

    Here's the error its currently throwing:

    The following packages have unmet dependencies:
     python-pip : Depends: python-pip-whl (= 20.0.2-5kali1) but 20.1.1-2 is to be installed
                  Recommends: python-all-dev (>= 2.6) but it is not going to be installed
                  Recommends: python-setuptools but it is not going to be installed
                  Recommends: python-wheel but it is not installable
    E: Unable to correct problems, you have held broken packages.
    

    I'm considering just reinstalling py2. I would just force the dependencies through, but wheel not being installable would not really allow that.

    LMAY75
    Always happy to help, DM me if you need anything!
    Link to Profile

  • Alright i grabbed a fresh parrot iso (4.10, security edition) for test, and before running a full system upgrade it let me install python-pip. Then I upgraded everything which pushed python-pip-whl to 20.1.1-2 and got rid of python-pip...which got me the same errors.
    I also tried dpkg installing a python-pip-whl 20.0.2-5 deb package but it apt got mad about it.
    Then i realized you shouldn't need python-pip afterall, check out the man page for pip:

    On Debian, pip is the command to use when installing packages for Python 2, while pip3 is the command to use when installing packages for Python 3

    Then i looked at the changelog for python-pip here:
    https://launchpad.net/debian/+source/python-pip/+changelog

    "Ship /usr/bin/pip in python3-pip since it is no longer provided elsewhere"

    So you should get pip (python2) and pip3 commands all from the python-pip package from now on.
    Hope this helps

    elseif

  • edited October 18

    Type your comment> @elseif said:

    Alright i grabbed a fresh parrot iso (4.10, security edition) for test, and before running a full system upgrade it let me install python-pip. Then I upgraded everything which pushed python-pip-whl to 20.1.1-2 and got rid of python-pip...which got me the same errors.
    I also tried dpkg installing a python-pip-whl 20.0.2-5 deb package but it apt got mad about it.
    Then i realized you shouldn't need python-pip afterall, check out the man page for pip:

    On Debian, pip is the command to use when installing > packages for Python 2, while pip3 is the command to > use when installing packages for Python 3

    Then i looked at the changelog for python-pip here:
    https://launchpad.net/debian/+source/python-pip/+changelog

    "Ship /usr/bin/pip in python3-pip since it is no longer provided elsewhere"

    So you should get pip (python2) and pip3 commands all from the python-pip package from now on.
    Hope this helps

    [email protected]:~# apt install python3-pip
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    python3-pip is already the newest version (20.1.1-2).
    0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
    

    Already had the latest version. Yes pip is installed with it, but it is mapped to pip3. I really need to be able to install dependencies for py2 tho. Pip2 seems to have disappeared from the face of the earth.

    LMAY75
    Always happy to help, DM me if you need anything!
    Link to Profile

  • edited October 18
    Well i bricked my system again :neutral:

    I guess I'll just install pip2 before updating and upgrading on the new install, thanks for letting me know that works @elseif

    LMAY75
    Always happy to help, DM me if you need anything!
    Link to Profile

  • ugh, just experienced the same issue, this worked like a charm for me though:
    https://pip.pypa.io/en/stable/installing/

    TL:DR;

    curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
    python get-pip.py
    
  • Hope it helps.

  • I've had to use pip2.7 when I update for older scripts...

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

    Then when you want to install just use sudo pip2.7 module

  • If you aint scared you can do this too :pensive:

    pip2.7 list --outdated --format=freeze | grep -v '^-e' | cut -d = -f 1 | xargs -n1 pip2.7 install -U

    works for pip3 as well but lol are you scared brah?

Sign In to comment.