Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"E: Unable to locate package python3-pip"

I am unable to locate package python-pip:

Reading package lists... Done
Building dependency tree Reading state information... Done
E: Unable to locate package python3-pip

How can I resolve this problem?

like image 747
Jagdip Singh Sandhu Avatar asked Sep 18 '18 21:09

Jagdip Singh Sandhu


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 ...

How do I install Python 3 pip packages?

Install pip using Python 3's setuptools: run sudo easy_install3 pip , this will give you the command pip-3.2 like kev's solution. Install your PyPI packages: run sudo pip-3.2 install <package> (installing python packages into your base system requires root, of course). … Profit!


2 Answers

For Ubuntu 18.04 with python 3.6.5 the python-pip package will install after :

sudo add-apt-repository universe sudo apt-get update 

Which is enabling the category universe

deb http://archive.ubuntu.com/ubuntu bionic main universe deb http://archive.ubuntu.com/ubuntu bionic-security main universe  deb http://archive.ubuntu.com/ubuntu bionic-updates main universe 
like image 133
Jagdip Singh Sandhu Avatar answered Oct 02 '22 19:10

Jagdip Singh Sandhu


Following a clean install of Ubuntu 18.04 (via Vagrant) the following was installed successfully with no issues:

sudo apt-get update
sudo apt-get install -y python3-pip

Note that the Ubuntu 18.04 download today shipped with Python 3.6.8 installed. This may vary by the time of your reading this post.

like image 31
Steven K7FAQ Avatar answered Oct 02 '22 20:10

Steven K7FAQ