user2991413
user2991413

Reputation: 551

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

Upvotes: 1

Views: 847

Answers (2)

VPfB
VPfB

Reputation: 17237

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

Upvotes: 2

kpazik
kpazik

Reputation: 185

Probably there can be problem with environment variable PATH. You can try again with searching:

whereis pip
sudo updatedb
locate pip

take also look on

env | grep -i PATH

Or try again installing pip (again)

#adding epel repository https://wiki.centos.org/AdditionalResources/Repositories

yum -y update #it will update your repo package references
yum -y install python-pip # -y parameter says yes 

Upvotes: 0

Related Questions