Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"E: Unable to locate package python-pip" on Ubuntu 18.04 [duplicate]

I am trying to install virtualenv on Ubuntu.

First it said command 'pip' not found, so I typed

sudo apt install python-pip 

then it said

E: Unable to locate package python-pip 

I tried to reset WSL, download using cmd but it doesn't work with Ubuntu. I don't know why. Even though I have downloaded python3, virtualenv, and pip using cmd. It doesn't work with Ubuntu 18.04. It also fails on Ubuntu 14.04.

aiki@LAPTOP-886AEJJG:~$ pip  Command 'pip' not found, but can be installed with:  sudo apt install python-pip  aiki@LAPTOP-886AEJJG:~$ sudo apt install python-pip [sudo] password for aiki: Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package python-pip 

I'm trying to install jarvis and mycroft on win 10, but I need to use Ubuntu because it only works with Linux.

like image 638
Aiki Avatar asked Mar 29 '19 17:03

Aiki


People also ask

How do I fix python unable to locate a package?

To Solve Unable to locate package python-pip Error Just follow these command step by step: sudo apt-get install software-properties-common Then run this command: sudo apt-add-repository universe Now, sudo apt-get update Then sudo apt-get install python-pip Second solution is You just need to Identify version that ...


2 Answers

ls /bin/python* 

Identify the highest version of python listed. If the highest version is something like python2.7 then install python2-pip If its something like python3.8 then install python3-pip

Example for python3.8:

sudo apt-get install python3-pip 
like image 125
Charles Avatar answered Sep 18 '22 12:09

Charles


Try following command sequence on Ubuntu terminal:

sudo apt-get install software-properties-common sudo apt-add-repository universe sudo apt-get update sudo apt-get install python-pip 
like image 20
BetaDev Avatar answered Sep 21 '22 12:09

BetaDev