Installing Scipy: You're likely to waste your time if you try using ATLAS

Posted 4 years ago | Originally written on 12 Nov 2011

Having grown up on a diet of Ubuntu life has always been so easy. Any time I need to install a library Canonical have done their duty and availed a sanitised version that I can snap on with a quick 'sudo apt-get' or 'sudo aptitude'. However, it's not a bed of roses once you're required to install ATLAS/LAPACK on a corporate server that hosts people's lives with multiple instances of FORTRAN compilers and a cluster configuration to boot. Now that's steep!

Blame it on ignorance but I've spent a great deal of hours trying to build Scipy dependencies (some people should not know that this is how I spend my time ;-)) with virtually no success. As I write, Scipy is finally coming to terms with its fate (yei!) and I'll soon be on terra familia (if there's such a phrase). Unfortunately, since I'm not using an optimised LAPACK installation, I'm bound not to benefit from whatever tweakings are claimed to exist. I'm so disappointed at the Scipy/Numpy/ATLAS/LAPACK documentation. Especially ATLAS/LAPACK. To be fair, the unoptimised installation I've just completed was from scipy.org but, seriously, I should not have to compromise in order to get decent functionality. I should also take part of the blame since it is in reference to past experiences that I've come to regard ATLAS/LAPACK of any merit; sadly, there is no ready subsitute (and I'm not going to bow to Bill & Friends Inc.).

The trouble has mainly rested with building (or not building) shared libraries for ATLAS/LAPACK. Well, I should leave LAPACK out of this but since they are meant to work together and originate from the same source the authors should take responsibility for the difficult installation process. What I find most unpleasant is how the ATLAS documentation just doesn't want to sit still. Perhaps it needs an overhaul to conform to other open projects in order to truly add value to the computing community.

The only way I've been able to get Scipy/Numpy installed was the following:

  1. Build BLAS and LAPACK using these instructions. Make sure to eventually place the environment variables in your .bashrc file in case you'll need them in future (you don't want to have do something like this twice).
  2. Build then install Numpy then Scipy using the following commands:
 python setup.py build --fcompiler=gnu95 # for gfortran or
 python setup.py build --fcompiler=gnu    # for g77

then

 python setup.py install

The compiler used during the build process must be the same as the one used during the BLAS/LAPACK build process.

Clearly, it didn't have to be that hard.