I was following a tutorial online for python and it had me do this:
akclark@enceladus:~$ pip install virtualenv
But I got the following:
Command 'pip' not found, but can be installed with:
sudo apt install python-pip
Easy enough, right? So I try it..
akclark@enceladus:~$ sudo apt install python-pip
But I get an error...
Reading package lists... Done
Building dependency tree Reading state information... Done
E: Unable to locate package python-pip
What am I doing wrong?
EDIT: Per Comments I have tried sudo apt update
EDIT2: I tried apt-cache madison python-pip
and got
N: Unable to locate package python-pip
EDIT3: grep '^deb ' /etc/apt/sources.list
showed
deb http://archive.ubuntu.com/ubuntu bionic main
deb http://archive.ubuntu.com/ubuntu bionic-security main
deb http://archive.ubuntu.com/ubuntu bionic-updates main
sudo apt update
then try again:sudo apt install python-pip
– Ravexina Aug 01 '18 at 15:34apt-cache madison python-pip
? edit your question add the output. – Ravexina Aug 01 '18 at 15:39grep '^deb ' /etc/apt/sources.list
– Ravexina Aug 01 '18 at 15:47pip
can cause bizarre conflicts and shouldn't be used for system packages anyway. You might well want a local install of a modernpip
(version 18 and beyond), and use it only with--user
. See ImportError in system pip wrappers after an upgrade · Issue #5599 · pypa/pip – nealmcb Jun 10 '19 at 22:51