-2

I am getting error while installing pip. I have python 3.9.2 installed.

root@kali:~# sudo apt-get install python3-pip
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python3-pip : Depends: python3-distutils but it is not going to be installed
               Depends: python3-setuptools but it is not going to be installed
               Recommends: python3-dev (>= 3.2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
root@kali:~# ^C

enter image description here

nobleknight
  • 755
  • 6
  • 15
  • check if `pip3` exists in your system. – Yuri Ginsburg Jun 12 '21 at 07:59
  • See [Why not upload images of code/errors when asking a question?](https://meta.stackoverflow.com/questions/285551/why-not-upload-images-of-code-errors-when-asking-a-question) for reasons **not** to do it. – martineau Jun 12 '21 at 08:31
  • Also https://stackoverflow.com/questions/45398413/error-while-installing-python3-and-pip3-in-kali-linux. I think the broad answer is "Kali Linux is pretty broken for day-to-day use; maybe use something else" – DavidW Jun 12 '21 at 21:56

2 Answers2

0

Pip comes installed with Python 2 >=2.7.9 or Python 3 >=3.4.

First check it using:

python -m pip --version

To install it manually: First, run this code to download get-pip.py using curl.

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

Then, run this command in the folder that you have installed get-pip.py

python get-pip.py
0

It’s weird but I thought apt-get is supposed to retrieve any dependencies. Yet it tells you what it’s missing and refuses to install them. Have you tried to install the dependencies, then pip?

I’m not too familiar with apt-get but I recommend checking the error message to get to the bottom of why it refuses to install the dependencies. Your screen shot doesn’t have the whole message.

The last resort is the force install option. See if it understands --force as an argument. Note that this might put your package management system in a strange state if it isn’t already.

I’m not sure what “ig” is but I do not plan to link other social network applications to this one.

Ben Y
  • 913
  • 6
  • 18