Install Python 2.7, Pip, Virtualenv under Fedora, RedHat Linux and CentOS

While developing the RhodeCode Installer I found a good (and reliable!) way to install Python 2.x, Pip (PyPI) and Virtualenv under current Fedora, RedHat Enterprise and CentOS Linux systems. I added an additional line after each line to make it more clear what should go on the same line.

Firstly, we install Python and make/build tools and then download a custom script which itself downloads and builds Pip. After that we update Pip just in case and install virtualenv:

sudo yum install make automake gcc gcc-c++ kernel-devel git-core -y

sudo yum install python-devel -y

sudo curl -o /tmp/

sudo /usr/bin/python /tmp/

sudo /usr/bin/easy_install pip

sudo rm setuptools-*.tar.gz

sudo pip install -i –upgrade pip

sudo pip install virtualenv