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-pipEasy 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-pipWhat 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-pipEDIT3: grep '^deb ' /etc/apt/sources.list showed
deb bionic main
deb bionic-security main
deb bionic-updates main 7 1 Answer
You have to enable universe category which contains python-pip package.
As David suggested, if you have software-properties-common installed, You can use this command to add universe category to your sources file:
sudo add-apt-repository universeThen:
sudo apt update
sudo apt install python-pipHowever if you rather to add it manually or you don't have add-apt-repository command available to run then follow these instructions:
Open /etc/apt/sources.list using an editor, for example nano:
sudo nano /etc/apt/sources.listthen add universe at the end of each line, like this:
deb bionic main universe
deb bionic-security main universe
deb bionic-updates main universePress Ctrl+o to save the file. Press Ctrl+x to quit nano.
then run:
sudo apt updateand finally:
sudo apt install python-pip 0