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: Bug #1870878 “Focal: python-pip broken dependancies” : Bugs : python-pip package : Ubuntu 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?

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:

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.

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

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:
Change log : python-pip package : Debian

"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

root@Parrot:~# 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.

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

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?

I was getting an egg_info error after using the get-pip.py. Not sure what was happening, but

“pip install --upgrade setuptools”

worked well for me. Now I can install requirements for Python2.7 code by using “pip2” commands.

Guys - I’m having this same issue and can’t work out how to fix it. Any ideas?

$python2.7 get-pip.py
Traceback (most recent call last):
File “get-pip.py”, line 24244, in
main()
File “get-pip.py”, line 199, in main
bootstrap(tmpdir=tmpdir)
File “get-pip.py”, line 82, in bootstrap
from pip._internal.cli.main import main as pip_entry_point
File “/tmp/tmpL_U7Uh/pip.zip/pip/_internal/cli/main.py”, line 60
sys.stderr.write(f"ERROR: {exc}")
^
SyntaxError: invalid syntax

you can try python2.7 -m pip not sure if that would work or not.

https://pip.pypa.io/en/stable/installing/

That doesnt work for me. Just says “/usr/bin/python2.7: No module named pip”. Tried installing via apt install python-pip but get the message :

Reading package lists… Done
Building dependency tree
Reading state information… Done
Package python-pip is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
python3-pip

Is there really no easy way to allow me to install Python2 specific dependencies? I’m just trying to do some windows enumeration using windows-exploit-suggester.py but it requires a python 2 library called python-xlrd. Trying to install that and I get the message

Package python-xlrd is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
python3-xlrd python-xlrd-docs

Which doesnt work as the suggester script is python2. Any other suggestions? Thx

I’m guessing you’re running as root or sudo on the commands yeah?

Now, I’ve never used this but saw it on a stream the other day.

It does have a section about python2 so maybe if you can’t get it to work normal.