Tired of waiting for a SciPy package to come out for SL6, I tried to compile
a version and was surprised to find success.

I have all standard SL6 packages for the dependencies, only the SciPy source
itself has to be downloaded.  This means that to follow my steps you'll need
to install python, numpy, gcc, gfortran, whatever BLAS/ATLAS you want.  I
basically went through the Add/Remove packages GUI and clicked anything that
looked like it might be a SciPy dependency.  I highly recommend the IPython
shell too, but I guess it's not necessary.

Since TUV shipped an older version of NumPy, you can't use the latest
SciPy.  The latest one that I found to work was
http://sourceforge.net/projects/scipy/files/scipy/0.7.1/ , though I had to
dig a bit to find version depency information, so I might have missed a
slightly higher version that also would work.

My instructions will assume not much familiarity with compiling code.

Download the tar archive to a suitable location, like ~/Software.  This
location should be where scipy will "live" in the future, so don't put it on
your desktop.
Issue the command "tar -xzvf scipy-0.7.1.tar.gz" which will extract
everything to ~/Software/scipy-0.7.1.  I like to move the original .tar.gz
file into this directory as well.
>From your scipy-0.7.1 directory, issue "python setup.py build".  This will
perform the actual compilation.  It took several minutes on my modern
quad-core machine.
>From the same directory, but now as root, issue "python setup.py install".
If you don't have root access on your system, you will need to use an option
like --prefix=/home/user/wherescipywillive, but then you'll also need to
tell your python interpreter to look there for scipy.

Now in your python shell, you can "import scipy" and try to run
"scipy.test()".  Mine returned a small number of errors, but the error
reports are not formatted for humans, so I'm willing to call it a success.

When a packaged SciPy eventually comes out for SL6, I do not know how to
properly undo the steps outlined above.  The setup.py script doesn't come
with an "uninstall" function, so some manual cleaning up will probably be
required.

Jean-François

Reply via email to