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
    Commented Aug 25, 2016 at 14:11
  • Did you enable the "Universe" repository?
    – edwinksl
    Commented Aug 25, 2016 at 14:51
  • how to do that?? Commented Aug 25, 2016 at 14:55
  • Do sudo add-apt-repository universe.
    – edwinksl
    Commented Aug 25, 2016 at 14:57
  • 'universe' distribution component is already enabled for all sources. Commented Aug 25, 2016 at 14:59

4 Answers 4

24

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 Commented Jul 7, 2019 at 21:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .