Some mathematically intense operations that use Numpy/Scipy can run faster with accelerated basic linear algebra subroutine (BLAS) libraries installed on your system (e.g., gensim’s corpus processing).
To see what BLAS libraries you are using, do:
If none of them are installed, you probably want to install one or more. ATLAS is always a good bet, since it’s portable and self-optimizing. There are others out there targeted at particular CPU architectures.
Unfortunately, the Scipy docs are out of date regarding installing accelerated BLAS libraries on Ubuntu. The instructions I have written below work for Ubuntu 10.04, the current LTS (long-term support) version, and though I haven’t tried to run them on a more recent version, it’s possible they work with those as well.
On Ubuntu 10.04, and possibly other versions, you need liblapack-dev and gfortran (yes, fortran):
Install the accelerated linear algebra libraries (ATLAS/LAPACK) in your virtualenv on Ubutu:
1 2 3 4 5 6 7
Now you can install numpy and scipy into the same virtualenv and be confident they will perform operations using the accelerated BLAS routines: