In order to install of PIP the Python packaging tool on RHEL 7 Linux we first need to install its only pre-requisite and that is setuptools package otherwise we will get a following error message:
Downloading/unpacking pip
  Cannot fetch index base URL https://pypi.python.org/simple/
  Could not find any downloads that satisfy the requirement pip
Cleaning up...
No distributions at all found for pip
Storing debug log for failure in /root/.pip/pip.log
From this reason we first install setuptools:
[root@rhel7 ~]# wget https://pypi.python.org/packages/source/s/setuptools/setuptools-7.0.tar.gz --no-check-certificate
[root@rhel7 ~]# tar xzf setuptools-7.0.tar.gz
[root@rhel7 ~]# cd setuptools-7.0
[root@rhel7 ~]# python setup.py install
...
Installed /usr/lib/python2.7/site-packages/setuptools-7.0-py2.7.egg
Processing dependencies for setuptools==7.0
Finished processing dependencies for setuptools==7.0
Once setuptools package is installed we can now proceed with the actual PIP installation. Here we assume that python is already installed on your Redhat 7 Linux system.
[root@rhel7 ~]# wget https://bootstrap.pypa.io/get-pip.py
[root@rhel7 ~]# python get-pip.py
Downloading/unpacking pip
  Downloading pip-1.5.6-py2.py3-none-any.whl (1.0MB): 1.0MB downloaded
Installing collected packages: pip
Successfully installed pip
Cleaning up...
All done. Let's confirm our actions by checking PIP version:
[root@rhel7 ~]# pip --version
pip 1.5.6 from /usr/lib/python2.7/site-packages (python 2.7)


ARE YOU LOOKING FOR A LINUX JOB?
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed on LinuxCareers.com.
LINUX CAREER NEWSLETTER
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.

You may also be interested in:



Comments and Discussions