Installation of PIP the Python packaging tool on RHEL 7 Linux

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
  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 --no-check-certificate
[root@rhel7 ~]# tar xzf setuptools-7.0.tar.gz
[root@rhel7 ~]# cd setuptools-7.0
[root@rhel7 ~]# python 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
[root@rhel7 ~]# python
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)

{loadposition python-tutorial-toc}