Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

2.7.2-gl3

started really building the shared python library

redhat6-x86_64-64bit-gcc44

These instructions should be performed as the glastrm user or with appropriate privileges to write in the GLAST_EXT area.
Note that the scipy unit test will report failures due to missing symbols in the rhel4 blas installed at SLAC.  This is likely always been the case, and apparently cannot be fixed unless we're will to install BLAS and Lapack ourselves.

  1. Download Python 2.7.2 from http://www.python.org/ and save to /afs/slac/g/glast/ground/GLAST_EXT/srcExtLibs if it doesn't already exist.
  2. Change directory to /afs/slac.stanford.edu/g/glast/ground/GLAST_EXT/redhat6-x86_64-64bit-gcc44/python
  3. Ungzip and Untar the file Python-2.7.2.tgz
  4. Set the environment variable EXTRA_CFLAGS to "-fPIC -fwrapv"
  5. Change directory to Python-2.7.2
  6. edit setup.py, in detect_modules() change the lines from:

        add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
        add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')

        to:

        add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
        add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
        add_dir_to_list(self.compiler.library_dirs, '/usr/lib')
        add_dir_to_list(self.compiler.include_dirs, '/usr/include')

      6. setenv LDFLAGS -fPIC; setenv CPPFLAGS -fPIC; setenv CFLAGS -fPIC

  1. Execute ./configure --prefix /afs/slac.stanford.edu/g/glast/ground/GLAST_EXT/redhat6-x86_64-64bit-gcc44/python/2.7.2/gcc34 --enable-shared
  2. Execute make
  3. Execute make install
  4. Leave and erase the current directory (Python-2.7.2)
  5. Wiki Markup
    install additional python modules the same way as python 2.7.1 instruction. As for matplotlib, most of matplolib unit tests requires functions from PIL imaging module which in turn requirez zlib.crc32 which has been an issue for us. After consulting with the users, we agreed that if in the future the users start to use functions in PIL, we will come back to re-visit the PIL issue again. For now, we will just skip the PIL module installation as we always have. Also there is a Scipy unit test need to be fixed after the Scipy installation. Edit scipy/stats/tests/test_morestats.py, change line #10 from "assert_raises" to "assert_raises, assert_" and change line #72 from "assert_array_less(crit\[:-1\], A)" to "assert_(A > crit\[-1\])".

distribute 0.6.16 for use with pip

  1. curl -O http://python-distribute.org/distribute_setup.py
  2. python distribute_setup.py

pip

curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python

nose 1.2.1

unit test framework necessary for running numpy and scipy unit tests

  1. pip install nose

NumPy - 1.6.1

Still installing by hand to include --fcompiler flag to force correct fortran compiler to be used.  This is dictated by whatever blas and lapack are linked against.  For more information, see the numpy INSTALL.txt file. On RHEL6-64:
glastrm@noric22 $ ldd /usr/lib64/liblapack.so
linux-vdso.so.1 => (0x00007fff49dff000)
libblas.so.3 => /usr/lib64/libblas.so.3 (0x00007fac2ac9d000)
libm.so.6 => /lib64/libm.so.6 (0x00007fac2aa18000)
libgfortran.so.3 => /usr/lib64/libgfortran.so.3 (0x00007fac2a726000)
libc.so.6 => /lib64/libc.so.6 (0x00007fac2a394000)
/lib64/ld-linux-x86-64.so.2 (0x00007fac2b72d000)

where libgfortran means we should use the gnu95 flag

  1. Download numpy-1.6.1.tar.gz from http://sourceforge.net/project/showfiles.php?group_id=1369&package_id=175103&release_id=628858
  2. Extract numpy-1.6.1.tar.gz
  3. Change directory to numpy-1.6.1
  4. unset LDFLAGS, CFLAGS if set above
  5. python setup.py build --fcompiler=gnu95   (for gfortran)
  6. python setup.py install
  7. Run the test routine by starting up python and doing:
    import numpy
    numpy.test()
  8. Leave and erase the current directory (numpy-1.6.1) 

PyFITS - 3.1

pip install pyfits

matplotlib 1.1.1

pip install matplotlib

http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.0/matplotlib-1.0.0.tar.gz

pywcs-1.11-4.8.2

pip install pywcs

APLpy-0.9.8

pip install APLpy

4Suite XML - 1.0.2

The 4Suite-XML web site no longer works via easy_install.  Installing by hand
python setup.py install

SciPy - 0.10.1

Continuing to install by hand to provide compiler flag to force correct fortran compiler, depending on what blas and lapack are linked against (try ldd /usr/lib/libblas.so). See SciPy's INSTALL.txt file for more information.
Download scipy-0.10.1.tar.gz from http://www.scipy.org/ and save to /afs/slac.stanford.edu/g/glast/ground/GLAST_EXT/redhat6-i686-64bit-gcc44/python if it doesn't already exist.
Extract scipy-0.10.1.tar.gz
Change directory to scipy-0.10.1
Execute python setup.py config_fc --fcompiler=gnu95 install 
Leave and erase scipy-0.10.1
Test by starting up python and doing:
import scipy
scipy.test()

pywcsgrid2

Download from https://github.com/leejjoon/pywcsgrid2/downloads
Extract
cd
python setup.py install

We do not distribute IPython any long due to ongoing issues with hard-coded paths associated with IPython.  Instead, we manually create the tar.gz file and copy it over to u35, then install IPython for use at SLAC in the GLAST_EXT copy.

PyYAML 3.1.0

curl -O http://pyyaml.org/download/pyyaml/PyYAML-3.10.tar.gzImage Added

python setup.py install

iPython - 0.13

pip install ipython
Run the iptest located in python's bin directory.

2.7.2

redhat6-x86_64-64bit-gcc44

These instructions should be performed as the glastrm user or with appropriate privileges to write in the GLAST_EXT area.
Note that the scipy unit test will report failures due to missing symbols in the rhel4 blas installed at SLAC.  This is likely always been the case, and apparently cannot be fixed unless we're will to install BLAS and Lapack ourselves.

...

  1. Execute ./configure --prefix /afs/slac.stanford.edu/g/glast/ground/GLAST_EXT/redhat6-x86_64-64bit-gcc44/python/2.7.2/gcc34 --enable-shared
  2. Execute make
  3. Execute make install
  4. Leave and erase the current directory (Python-2.7.2)
  5. Wiki Markup
    install additional python modules the same way as python 2.7.1 instruction. As for matplotlib, most of matplolib unit tests requires functions from PIL imaging module which in turn requirez zlib.crc32 which has been an issue for us. After consulting with the users, we agreed that if in the future the users start to use functions in PIL, we will come back to re-visit the PIL issue again. For now, we will just skip the PIL module installation as we always have. Also there is a Scipy unit test need to be fixed after the Scipy installation. Edit scipy/stats/tests/test_morestats.py, change line #10 from "assert_raises" to "assert_raises, assert_" and change line #72 from "assert_array_less(crit\[:-1\], A)" to "assert_(A > crit\[-1\])".

distribute 0.6.16 for use with pip

  1. curl -O http://python-distribute.org/distribute_setup.py
  2. python distribute_setup.py

pip

curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python

NumPy - 1.6.1

Still installing by hand to include --fcompiler flag to force correct fortran compiler to be used.  This is dictated by whatever blas and lapack are linked against.  For more information, see the numpy INSTALL.txt file. On RHEL6-64:
glastrm@noric22 $ ldd /usr/lib64/liblapack.so
linux-vdso.so.1 => (0x00007fff49dff000)
libblas.so.3 => /usr/lib64/libblas.so.3 (0x00007fac2ac9d000)
libm.so.6 => /lib64/libm.so.6 (0x00007fac2aa18000)
libgfortran.so.3 => /usr/lib64/libgfortran.so.3 (0x00007fac2a726000)
libc.so.6 => /lib64/libc.so.6 (0x00007fac2a394000)
/lib64/ld-linux-x86-64.so.2 (0x00007fac2b72d000)

...

  1. Download numpy-1.6.1.tar.gz from http://sourceforge.net/project/showfiles.php?group_id=1369&package_id=175103&release_id=628858
  2. Extract numpy-1.6.1.tar.gz
  3. Change directory to numpy-1.6.1
  4. unset LDFLAGS, CFLAGS if set above
  5. python setup.py build --fcompiler=gnu95   (for gfortran)
  6. python setup.py install
  7. Run the test routine by starting up python and doing:
    import numpy
    numpy.test()
  8. Leave and erase the current directory (numpy-1.6.1) 

PyFITS - 3.1

pip install pyfits

matplotlib 1.1.0

...

http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.0/matplotlib-1.0.0.tar.gz

pywcs-1.11-4.8.2

pip install pywcs

APLpy-0.9.8

pip install APLpy

4Suite XML - 1.0.2

The 4Suite-XML web site no longer works via easy_install.  Installing by hand
python setup.py install

SciPy - 0.10.1

Continuing to install by hand to provide compiler flag to force correct fortran compiler, depending on what blas and lapack are linked against (try ldd /usr/lib/libblas.so). See SciPy's INSTALL.txt file for more information.
Download scipy-0.10.1.tar.gz from http://www.scipy.org/ and save to /afs/slac.stanford.edu/g/glast/ground/GLAST_EXT/redhat6-i686-64bit-gcc44/python if it doesn't already exist.
Extract scipy-0.10.1.tar.gz
Change directory to scipy-0.10.1
Execute python setup.py config_fc --fcompiler=gnu95 install 
Leave and erase scipy-0.10.1
Test by starting up python and doing:
import scipy
scipy.test()

pywcsgrid2

Download from https://github.com/leejjoon/pywcsgrid2/downloads
Extract
cd
python setup.py install

We do not distribute IPython any long due to ongoing issues with hard-coded paths associated with IPython.  Instead, we manually create the tar.gz file and copy it over to u35, then install IPython for use at SLAC in the GLAST_EXT copy.

iPython - 0.13

pip install ipython
Run the iptest located in python's bin directory.

...

These modules should additionally be installed into python after updating PATH to point to the new python binary.

distribute 0.6.16 for use with pip

  1. curl -O http://python-distribute.org/distribute_setup.py
  2. python distribute_setup.py

...

APLpy-0.9.5

  1. pip install APLpy

4Suite XML - 1.0.2

This module was not recognized by pip.  Using easy_install instead.

...

  1. pip install ipython
  2. Run the iptest located in python's bin directory.

pywcsgrid2

  1. Download from https://github.com/leejjoon/pywcsgrid2/downloads
  2. Extract
  3. cd
  4. python setup.py install

...

  1. Download pyfits-1.3.tar.gz from http://www.stsci.edu/resources/software_hardware/pyfits/pyfits-1.3.tar.gz and save to /afs/slac/g/glast/ground/GLAST_EXT/tiger-i386-32bit/python/ if it doesn't already exist.
  2. Change directory to /afs/slac/g/glast/ground/GLAST_EXT/tiger-i386-32bit/python
  3. Extract pyfits-1.3.tar.gz
  4. Change directory to pyfits-1.3
  5. Execute /afs/slac/g/glast/ground/GLAST_EXT/tiger-i386-32bit/python/2.5.1-gl3/gcc40/bin/python setup.py install
  6. Leave and erase pyfits-1.3

4Suite XML - 1.0.2

  1. Download 4Suite-XML-1.0.2.tar.gz from http://downloads.sourceforge.net/sourceforge/foursuite/4Suite-XML-1.0.2.tar.gz?use_mirror=voxel and save to /afs/slac/g/glast/ground/GLAST_EXT/tiger-i386-32bit/python/ if it doesn't already exist.
  2. Change directory to /afs/slac/g/glast/ground/GLAST_EXT/tiger-i386-32bit/python
  3. Extract 4Suite-XML-1.0.2.tar.gz
  4. Change directory to 4Suite-XML-1.0.2
  5. Execute /afs/slac/g/glast/ground/GLAST_EXT/tiger-i386-32bit/python/2.5.1-gl3/gcc40/bin/python setup.py install --prefix /afs/slac/g/glast/ground/GLAST_EXT/tiger-i386-32bit/python/2.5.1-gl3/gcc40
  6. Leave and erase 4Suite-XML-1.0.2

...

  1. Download pyfits-2.1.1.tar.gz from http://www.stsci.edu/resources/software_hardware/pyfits/pyfits-2.1.1.tar.gz and save to /afs/slac/g/glast/ground/GLAST_EXT/tiger-i386-32bit-gcc40/python/ if it doesn't already exist.
  2. Change directory to /afs/slac/g/glast/ground/GLAST_EXT/tiger-i386-32bit-gcc40/python
  3. Extract pyfits-2.1.1.tar.gz
  4. Change directory to pyfits-2.1.1
  5. Execute /afs/slac/g/glast/ground/GLAST_EXT/tiger-i386-32bit-gcc40/python/2.5.1-gl4/gcc40/bin/python setup.py install
  6. Leave and erase pyfits-2.1.1

4Suite XML - 1.0.2

  1. Download 4Suite-XML-1.0.2.tar.gz from http://downloads.sourceforge.net/sourceforge/foursuite/4Suite-XML-1.0.2.tar.gz?use_mirror=voxel and save to /afs/slac/g/glast/ground/GLAST_EXT/tiger-i386-32bit-gcc40/python/ if it doesn't already exist.
  2. Change directory to /afs/slac/g/glast/ground/GLAST_EXT/tiger-i386-32bit-gcc40/python
  3. Extract 4Suite-XML-1.0.2.tar.gz
  4. Change directory to 4Suite-XML-1.0.2
  5. Execute /afs/slac/g/glast/ground/GLAST_EXT/tiger-i386-32bit-gcc40/python/2.5.1-gl4/gcc40/bin/python setup.py install --prefix /afs/slac/g/glast/ground/GLAST_EXT/tiger-i386-32bit-gcc40/python/2.5.1-gl4/gcc40
  6. Leave and erase 4Suite-XML-1.0.2

...

  1. Change directory to /afs/slac.stanford.edu/g/glast/ground/GLAST_EXT/redhat4-i686-32bit-gcc34/python
  2. Extract APLpy-0.9.4.tar.gz
  3. Change directory to APLpy-0.9.4
  4. Execute /afs/slac.stanford.edu/g/glast/ground/GLAST_EXT/redhat4-i686-32bit-gcc34/python/2.5.1-gl5/gcc34/bin/python setup.py install
  5. Leave and erase APLpy-0.9.4

4Suite XML - 1.0.2

  1. Download 4Suite-XML-1.0.2.tar.gz from http://downloads.sourceforge.net/sourceforge/foursuite/4Suite-XML-1.0.2.tar.gz?use_mirror=voxel and save to /afs/slac.stanford.edu/g/glast/ground/GLAST_EXT/redhat4-i686-32bit-gcc34/python if it doesn't already exist.
  2. Change directory to /afs/slac.stanford.edu/g/glast/ground/GLAST_EXT/redhat4-i686-32bit-gcc34/pythonExtract 4Suite-XML-1.0.2.tar.gz
  3. Change directory to 4Suite-XML-1.0.2
  4. Execute /afs/slac.stanford.edu/g/glast/ground/GLAST_EXT/redhat4-i686-32bit-gcc34/python/2.5.1-gl5/gcc34/bin/python setup.py install --prefix /afs/slac.stanford.edu/g/glast/ground/GLAST_EXT/redhat4-i686-32bit-gcc34/python/2.5.1-gl5/gcc34
  5. Leave and erase 4Suite-XML-1.0.2

...

  1. Change directory to /afs/slac.stanford.edu/g/glast/ground/GLAST_EXT/redhat4-i686-32bit-gcc34/python
  2. Extract APLpy-0.9.4.tar.gz
  3. Change directory to APLpy-0.9.4
  4. Execute /afs/slac.stanford.edu/g/glast/ground/GLAST_EXT/redhat4-i686-32bit-gcc34/python/2.6.5/gcc34/bin/python setup.py install
  5. Leave and erase APLpy-0.9.4

4Suite XML - 1.0.2

  1. Download 4Suite-XML-1.0.2.tar.gz from http://downloads.sourceforge.net/sourceforge/foursuite/4Suite-XML-1.0.2.tar.gz?use_mirror=voxel and save to /afs/slac.stanford.edu/g/glast/ground/GLAST_EXT/redhat4-i686-32bit-gcc34/python if it doesn't already exist.
  2. Change directory to /afs/slac.stanford.edu/g/glast/ground/GLAST_EXT/redhat4-i686-32bit-gcc34/pythonExtract 4Suite-XML-1.0.2.tar.gz
  3. Change directory to 4Suite-XML-1.0.2
  4. Execute /afs/slac.stanford.edu/g/glast/ground/GLAST_EXT/redhat4-i686-32bit-gcc34/python/2.6.5/gcc34/bin/python setup.py install --prefix /afs/slac.stanford.edu/g/glast/ground/GLAST_EXT/redhat4-i686-32bit-gcc34/python/2.6.5/gcc34
  5. Leave and erase 4Suite-XML-1.0.2

...