On CentOS 5 and 6 you unfortunately cannot install a newer version of python instead of the default one, because the package controller “yum” depends on it. The only way to go is to make an altinstall. The following article describes it really well:
http://toomuchdata.com/2012/06/25/how-to-install-python-2-7-3-on-centos-6-2/
in order to make python2.7 command available to the root now (typically for the module installation), add python2.7 to root’s path:
PATH=$PATH:/usr/local/bin export PATH
Now you can safely install all the fancy python modules you want. Well, almost all.
Building Scipy with alternative install of Python isn’t really a piece of cake neither, since it requires to first install LAPACK, ATLAS and BLAS packages, which is not completely direct for complete newcomers. This tutorial explains well how to do it exactly:
http://www.shocksolution.com/2011/08/how-to-build-scippy-with-python-2-7-2-on-centos5/
Btw, once you’ve installed all the modules listed in the link above, you can just do
sudo pip install scipy
and wait until it finishes compiling.
Enjoy!