daniel lugo
daniel lugo

Reputation: 173

E: Package 'python-pip' has no installation candidate

$ sudo apt-get install python-pip
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

both my pip and pip3 are installed in python 3

pip -V
pip 20.1.1 from /usr/lib/python3/dist-packages/pip (python 3.8)


pip3 -V
pip 20.1.1 from /usr/lib/python3/dist-packages/pip (python 3.8)

Now i cant install pip ...it shows above error

Upvotes: 15

Views: 111144

Answers (4)

Gopala Raja Naika
Gopala Raja Naika

Reputation: 2679

Please try this

sudo apt-get install python3-pip

Upvotes: 3

DataBach
DataBach

Reputation: 1635

Just for reference, this problem can occur if you are using Windows Ubuntu Shell and your firewall is blocking your Ubuntu sandbox's traffic. In that case installation resources can not be found and simple apt-update will not work.

In order to test if the firwall causes your problem, you can simply try to ping a website. Also if apt-update will fail with connection refused the firwall is likely your problem. Check this post on how to add your sandbox to the firewall whitelist (Endpoint Protection).

Upvotes: 0

Shingala_Yagnik
Shingala_Yagnik

Reputation: 482

If you have python(python2) installed you then you can use following command to install pip(for python2).

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

Now you can check for pip2

pip2 --version

I hope these will help you

Upvotes: 45

Gulshan Yadav
Gulshan Yadav

Reputation: 136

Use these commands first then try again and perform a reinstallation by sudo apt reinstall python3-pip

  1. sudo add-apt-repository universe
  2. sudo add-apt-repository multiverse
  3. sudo apt-get update

Upvotes: -5

Related Questions