Unable to install pip in ubuntu?
I tried to install pip several times but could not. This is what my terminal looks like when trying to install pip:
aman@aman-HP-Pavilion-Notebook:~$ sudo apt-get install python-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-pip is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
aman@aman-HP-Pavilion-Notebook:~$ pip
The program 'pip' is currently not installed. You can install it by typing:
sudo apt-get install python-pip
aman@aman-HP-Pavilion-Notebook:~$ sudo pip
sudo: pip: command not found
aman@aman-HP-Pavilion-Notebook:~$
source to share
Try the following commands:
sudo apt-get purge --auto-remove python-pip
sudo apt-get update
sudo apt-get -y install python-pip
curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
python get-pip.py
check:
pip --help
pip -V
The issue may be available for a package in the Ubuntu 14.04 Universe repository.
If that doesn't work, download the .deb here:
https://packages.ubuntu.com/trusty/all/python-pip/download
and right click on the .deb and install it
source to share
the problem is, you probably have two versions of python 2 installed on your pc in different locations and pip from one of the python copies has been removed somehow. so when you try to install pip for copy, system says pip already exists elsewhere and also / usr / local / bin folder is also missing pip file used to install pip.
I just solved this problem, so I will try to explain it in a way that newbies also get it right.
copy the already installed pip file to the location where it is missing instead of installing it via commands, as the command will detect pip already installed.
the solution is very simple:
run these commands in terminal (command line) in Ubuntu
which pip
# to get the location of an already installed pip file
the cp location provided by the copy location where the pip file is copied
hope this helps.
source to share