0

I am using Ubuntu 21.10. When I write this in command line:

sudo apt-get install python3-pip

It gives this:

Reading package lists... Done
Building dependency tree... Done
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-distutils : Depends: python3-lib2to3 (= 3.9.5-0ubuntu3) but 3.9.7-1 is to be installed
 python3-setuptools : Depends: python3-pkg-resources (= 52.0.0-3) but 52.0.0-4 is to be installed
E: Unable to correct problems, you have held broken packages.

How do I solve this?

Nmath
  • 12,333

2 Answers2

0

when i had this problem i did this to fix it

sudo apt update --fix-missing
sudo apt install -f python3-pip 

and it worked fine for me if that doesn't work a friend of mine did

python get-pip.py

and it installed for her

If none of those work the last thing i know to try is

sudo python -m pip install pip
0

I just encountered the same issue as yours. it was resolved by first running:

sudo apt update --fix-missing

then:

sudo apt-get install python3-pip
Artur Meinild
  • 26,018