pythonpippython-install

Centos: Not able to install pip


I am totally new to python so I have no clue what's happening here.

When I do

which pip
/usr/bin/which: no pip in (/usr/local/bin/python:/usr/bin/python2:/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)

and then to install pip, when I do

sudo yum install python-pip

I get this

Loaded plugins: fastestmirror, versionlock
Loading mirror speeds from cached hostfile
 * base: centos.myfahim.com
 * epel: kartolo.sby.datautama.net.id
 * extras: centos.myfahim.com
 * updates: centos.myfahim.com
Package python2-pip-8.1.2-5.el7.noarch already installed and latest version
Nothing to do

Can someone please help. It's very frustrating.

PS: Here are my python details which python /usr/local/bin/python

python --version

Python 2.6.6


Solution

  • The python2-pip RPM contains:

    /usr/bin/pip
    /usr/bin/pip2
    /usr/bin/pip2.7
    

    When there seems to be no pip in /usr/bin, check with:

    rpm -qV python2-pip

    for missing files and reinstall the RPM if necessary:

    yum reinstall python2-pip

    (Enabled epel repository is assumed.)