I'm trying to install Numpy and Scipy with OpenBLAS on Ubuntu 14.04 to run Theano faster.
I followed the instructions I found here:
git clone https://github.com/xianyi/OpenBLAS
cd OpenBLAS
make FC=gfortran
sudo make PREFIX=/opt/openblas install
Installing numpy in /usr/local/lib:
git clone https://github.com/numpy/numpy
cd numpy
Here's my site.cfg file:
[default]
include_dirs = /opt/openblas/include
library_dirs = /opt/openblas/lib
[openblas]
openblas_libs = openblas
library_dirs = /opt/openblas/lib
[lapack]
lapack_libs = openblas
library_dirs = /opt/openblas/lib
Building:
python setup.py build --fcompiler=gnu95
Installing:
python setup.py install
I can't find core/_dotblas.so under build/lib.linux-x86_64-2.7/numpy/core but I get good results when testing the dot, multiplication, SVD and Eigendecomposition operations.
So it looks like numpy got installed properly. The problem comes when I try to install Scipy and there's no documentation for that part since a pip install is supposed to work.
Cloning scipy in /usr/local/lib:
git clone https://github.com/scipy/scipy
Getting libatlas:
sudo apt-get install libatlas-base-dev
cd /usr/local/lib
sudo ln -sn /usr/lib/atlas-base/liblapack_atlas.a liblapack_atlas.a
sudo ln -sn /usr/lib/atlas-base/liblapack_atlas.so liblapack_atlas.so
site.cfg file for scipy:
[default]
include_dirs = /opt/openblas/include
library_dirs = /opt/openblas/lib
[atlas]
atlas_libs = lapack_atlas,openblas,cblas
Building scipy:
python setup.py build
gives me the following error:
compiling C++ sources
C compiler: c++ -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -fPIC
compile options: '-Iscipy/interpolate/src -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c'
c++: scipy/interpolate/src/_interpolate.cpp
sh: 1: c++: not found
sh: 1: c++: not found
error: Command "c++ -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -fPIC -Iscipy/interpolate/src -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c scipy/interpolate/src/_interpolate.cpp -o build/temp.linux-x86_64-2.7/scipy/interpolate/src/_interpolate.o" failed with exit status 127
I've spent significant time looking for suggestions and am not sure what to do next.