As part of a recent Python for Astronomers workshop on installation, Jon Chappell created a nice bash script to do a root install of scientific Python that works on recent Fedora machines.  You might find it useful!

#!/bin/bash



### This script installs a number of base and addon packages to create a
# scientific python distribution - notes from T. Aldcroft @ cfa
# 
# "The presentation materials are available at the link below. 
# http://python4astronomers.github.com/installation/installation.html
#
# Those new to Python or new to CfA are invited to check out the full
# Practical Python for Astronomers workshop materials:
# http://python4astronomers.github.com "
#
# J Chappell 2012/04/05



PROG="python-sci-package-install.sh"


echo "#=================================================================="
echo "Program: $PROG"
echo
echo "This script installs a number of base and addon packages to create a
scientific python distribution - notes from T. Aldcroft @ cfa"
echo
echo -n "OK to continue [y|N]: "
read rv
if [ $rv != 'y' ]
then
	exit 0
fi

if [ "$(id -u)" != "0" ]; then
 echo "This script must be run as root" 1>&2
 exit 1
fi


echo
echo "#=================================================================="
echo "Begin yum package python updates:"
PKGS="
python-matplotlib 
python-setuptools 
python-devel
numpy 
scipy 
"
for PKG in $PKGS
do
	echo "============"
	CMD="yum -y install $PKG"
	echo "$CMD"
	$CMD
	if [ ! $? ]
	then
		echo "ERROR: rv=$rv"
		echo " CMD: $CMD"
 	exit $rv
	fi
	echo
done



echo
echo "#=================================================================="
echo "Begin pip package python updates:"
PKGS="
distribute
asciitable
pyfits
pywcs
atpy
aplpy
pyregion
pyparsing
http://stsdas.stsci.edu/astrolib/vo-0.7.2.tar.gz
http://stsdas.stsci.edu/astrolib/coords-0.37.tar.gz
"
easy_install --upgrade pip
for PKG in $PKGS
do
	echo "============"
	CMD="pip install --upgrade $PKG"
	echo "$CMD"
	$CMD
	if [ ! $? ]
	then
		echo "ERROR: rv=$rv"
		echo " CMD: $CMD"
 	exit $rv
	fi
	echo
done




echo
echo "#=================================================================="
echo "Test scientific package python install:"

echo "
import matplotlib
import numpy
import scipy
import scipy.linalg
import asciitable
import pyfits
import pywcs
import atpy
import aplpy
print numpy.__version__
print scipy.__version__
print matplotlib.__version__
exit
" > $$.test.py

cat $$.test.py
echo

python $$.test.py
rv=$?

echo "Test script returns: $?"
rm $$.test.py

echo
echo "Install script [$PROG]: DONE."


exit 0



    6           11