10

I recently updated my windows and install bash on ubuntu on windows 10.I use the command sudo apt-get install python-pip

This is the snap of error im getting

5
  • 2
    But did you try sudo apt-get -f install with no packages? That's what the error message is asking you to do but there is no evidence you tried that.
    – edwinksl
    Aug 25 '16 at 14:11
  • Did you enable the "Universe" repository?
    – edwinksl
    Aug 25 '16 at 14:51
  • how to do that?? Aug 25 '16 at 14:55
  • Do sudo add-apt-repository universe.
    – edwinksl
    Aug 25 '16 at 14:57
  • 'universe' distribution component is already enabled for all sources. Aug 25 '16 at 14:59
23

Simply run

sudo apt-get update

and then

sudo apt-get install python3-pip

or python-pip depending on your version.

Apparently fresh install doesn't have full list of available packages cashed.

1
1

You can try

sudo apt-get clean

or

sudo apt-get autoclean

then

sudo apt-get -f install

it will resolve your problem

1

For anyone coming across this in the future, simply run:

python3 -m pip install [package]
0

It seems Ubuntu on windows 10 is not up-to-date when install, run simply:

sudo apt-get update

if Python2:

sudo apt-get install python-pip

if Python3:

sudo apt-get install python3-pip

To get pip for python3 (Python 2 is available by default for pip)

1
  • I just install Ubuntu, I run sudo apt-get update sudo apt-get install python-pip Then when I enter: python --version #error python3 --version #Python 3.6.7 python2 --version #Python 2.7.15+ You are right! I add this to my answer. Thank you Jul 7 '19 at 21:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.