Easiest way to install numpy using LAPACK / BLAS?
I am on Ubuntu 14.04.
I would expect:
sudo apt-get install python-numpy
would work, but it doesn't ...
The way I tried to check is to do this locate blas
and not find anything that would seem relevant.
I need a solution that doesn't require compiling from source.
The perfect solution is what ubuntu repositories use.
source to share
On Ubuntu 14.04 and later, blas and lapack are installed as part of python-scipy and python3-scipy, so you need to install python-scipy. Open a terminal and enter:
sudo apt install python-scipy
This command will also install libblas3 (base implementations of basic algebraic algebra routines, shared library) and liblapack3 (linear algorithms library 3 - general version) as dependencies, and also install python-numpy as a dependency if you haven't already installed it.
source to share
numpy.show_config()
showed that I didn't have BLAS support even though it was python3-scipy
already installed. Uninstall and reinstall python3-scipy
and python3-numpy
fixed it:
sudo apt-get remove python3-scipy python3-numpy
sudo apt-get install python3-scipy pthon3-numpy
I now have LAPACK / BLAS support:
>>> numpy.show_config()
openblas_lapack_info:
NOT AVAILABLE
mkl_info:
NOT AVAILABLE
atlas_3_10_blas_threads_info:
NOT AVAILABLE
lapack_info:
libraries = ['lapack', 'lapack']
language = f77
library_dirs = ['/usr/lib']
atlas_3_10_blas_info:
NOT AVAILABLE
openblas_info:
NOT AVAILABLE
blas_opt_info:
libraries = ['blas', 'blas']
define_macros = [('NO_ATLAS_INFO', 1), ('HAVE_CBLAS', None)]
library_dirs = ['/usr/lib']
language = c
blas_info:
libraries = ['blas', 'blas']
language = c
library_dirs = ['/usr/lib']
define_macros = [('HAVE_CBLAS', None)]
blas_mkl_info:
NOT AVAILABLE
atlas_info:
NOT AVAILABLE
atlas_3_10_threads_info:
NOT AVAILABLE
lapack_mkl_info:
NOT AVAILABLE
atlas_blas_threads_info:
NOT AVAILABLE
atlas_3_10_info:
NOT AVAILABLE
atlas_threads_info:
NOT AVAILABLE
atlas_blas_info:
NOT AVAILABLE
lapack_opt_info:
libraries = ['lapack', 'lapack', 'blas', 'blas']
define_macros = [('NO_ATLAS_INFO', 1), ('HAVE_CBLAS', None)]
library_dirs = ['/usr/lib']
language = c
source to share