build python-libs

Usage:

$module load python/2.6.6
numpy 1.7.0
scipy 0.12.0
tables 3.0.0 (need module load hdf5)
matplotlib 1.2.1
mayavi 4.3.0
quantities
pyro

 Install

OS: CentOS 6.x
dependence: atlas

 

numpy

$cd /tmp/
$tar xzvf /install/archive/src/numpy-1.7.0.tar.gz
$cd numpy-1.7.0/
$module load compiler/gcc/4.4 python/2.6.6
$export BLAS=/usr/lib64/atlas/libcblas.so
$export LAPACK=/usr/lib64/atlas/liblapack.so
$export ATLAS=/usr/lib64/atlas/libatlas.so
$$PYTHON_EXE setup.py build --fcompiler=gnu95
$$PYTHON_EXE setup.py install --prefix=$PYTHON_MOD_PATH
$ echo $PYTHON_MOD_PATH 
/pkg/python-libs/

scipy

$$PYTHON_EXE setup.py build --fcompiler=gnu95
$$PYTHON_EXE setup.py install --prefix=/pkg/python-libs

other

$easy_install --install-dir=$PYTHON_MOD_PATH/lib/$PYTHON_VER/site-packages/ numexpr
$easy_install --install-dir=$PYTHON_MOD_PATH/lib/$PYTHON_VER/site-packages/ cython
$easy_install --install-dir=$PYTHON_MOD_PATH/lib/$PYTHON_VER/site-packages/ tables

$yum install -y PyQt4
$yum install -y pygtk2
$yum install -y pygtk2-devel
$yum install -y PyQt4-devel
$yum install -y vtk-devel
$yum install -y vtk-python
$yum install -y qt4-devel

$easy_install --install-dir=$PYTHON_MOD_PATH/lib/$PYTHON_VER/site-packages/ matplotlib
$easy_install --install-dir=$PYTHON_MOD_PATH/lib/$PYTHON_VER/site-packages/ mayavi
$easy_install --install-dir=$PYTHON_MOD_PATH/lib/$PYTHON_VER/site-packages/ configobj
$easy_install --install-dir=$PYTHON_MOD_PATH/lib/$PYTHON_VER/site-packages/ ipython