Install python-2.7 and fabric on CentOS-5.6

Install the required packages first:

# yum install gcc gcc-c++.x86_64 compat-gcc-34-c++.x86_64 openssl-devel.x86_64 zlib*.x86_64

Download and install python-2.7 from source:

$ wget
$ tar -xvzf Python-2.7.2.tgz
$ cd Python-2.7.2
$ ./configure --with-threads --enable-shared
$ make
# make install

Link the shared library:

# echo "/usr/local/lib" >>/etc/
# ldconfig

Verify with:

$ which python
$ python -V

Install easy_install:

$ wget
# python

Install fabric via easy_install:

easy_install fabric

To get the location of site-packages for current version of python:

$ python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

sqlite-devel for Python-2.7.6

sqlite-devel for Python-2.7.6 is another requirement.

And make tool...

If not installed:

yum install make