3

I'm trying to install python-pip using apt-get on ubuntu 15.04, but I get an error saying it's not found.

ubuntu@ubuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 15.04
Release:    15.04
Codename:   vivid
ubuntu@ubuntu:~$ sudo apt-get install python-pip
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package python-pip
ubuntu@ubuntu:~$ 

According to launchpad it should exist.

https://launchpad.net/ubuntu/vivid/+source/python-pip

My /etc/apt/sources.list looks like

ubuntu@ubuntu:~$ sudo cat /etc/apt/sources.list
deb cdrom:[Ubuntu 15.04 _Vivid Vervet_ - Release amd64 (20150422)]/ vivid main restricted
deb http://archive.ubuntu.com/ubuntu/ vivid main restricted
deb http://security.ubuntu.com/ubuntu/ vivid-security main restricted
deb http://archive.ubuntu.com/ubuntu/ vivid-updates main restricted

Any ideas?

2 Answers2

4

python-pip package is available in the universe repository but your /etc/apt/sources.list does not contain the entry for the universe repository, as a result you will not be able to download anything from that repo unless you add it.

To add the universe repo to your /etc/apt/sources.list, run:

echo "deb http://archive.ubuntu.com/ubuntu/ vivid universe" | sudo tee -a "/etc/apt/sources.list"

If you are interested in source files, then add this too:

echo "deb-src http://archive.ubuntu.com/ubuntu/ vivid universe" | sudo tee -a "/etc/apt/sources.list"

Run sudo apt-get update and now you can install python-pip by:

sudo apt-get install python-pip
heemayl
  • 91,753
0

Consider first upgrading your not supported release. Read: How to upgrade from not supported Ubuntu using the command line?

Then:

  1. Install easy_install by: sudo apt-get install python-setuptools command (for Python 3 use: python3-setuptools).
  2. Install Pip by: sudo python -m easy_install install pip (for Python 3 use python3).
kenorb
  • 10,347