title: How to make sure the numpy BLAS libraries are available as dynamically-loadable libraries?
body: <p>The <a href="http://www.deeplearning.net/software/theano/install.html#troubleshooting-make-sure-you-have-a-blas-library" rel="noreferrer">theano installation documentation</a> states, that <a href="http://www.deeplearning.net/software/theano/" rel="noreferrer">theano</a> will as a default use the BLAS libraries from numpy, if the "BLAS libraries are available as dynamically-loadable libraries". This seems not to be working on my machine, see error message.</p>
  
  <ul>
  <li>How do I find out, if the numpy BLAS libraries are availalbe as dynamically-loadable?</li>
  <li>How do I recompile the numpy BLAS libraries, if they are not dynamically-loadable?</li>
  </ul>
  
  <p>Please indicate, if you would need more information!</p>
  
  <p><strong>Error message</strong></p>
  
  <p><code>We did not found a dynamic library into the library_dir of the library we use for blas. If you use ATLAS, make sure to compile it with dynamics library.
  /usr/bin/ld: cannot find -lblas</code></p>
  
  <p><strong>Appendix</strong></p>
  
  <p>The <a href="http://www.deeplearning.net/software/theano/" rel="noreferrer">theano</a> library needs among other things numpy and a BLAS library. I figured numpy comes with BLAS if you install it with <a href="http://www.scipy.org/Installing_SciPy/Linux#head-fb320be917b02f8fbe70e3fb2c9fe6f5f5f06fc2" rel="noreferrer"><code>sudo apt-get install python-numpy python-scipy</code></a> under Ubuntu. </p>
  
  <p>This is the filelisting of <code>/usr/lib64/python2.6/dist-packages/scipy/lib/blas</code></p>
  
  <pre><code>cblas.so  info.py   __init__.py   scons_support.py   setup.py     
  fblas.so  info.pyc  __init__.pyc  scons_support.pyc  setup.pyc  
  setupscons.py  test
  setupscons.pyc
  </code></pre>
  
  <p>This is the output of <code>distutils.__config__.show()</code> is as follows</p>
  
  <pre><code>blas_info:
      libraries = ['blas']
      library_dirs = ['/usr/lib64']
      language = f77
  
  lapack_info:
      libraries = ['lapack']
      library_dirs = ['/usr/lib64']
      language = f77
  
  atlas_threads_info:
    NOT AVAILABLE
  
  blas_opt_info:
      libraries = ['blas']
      library_dirs = ['/usr/lib64']
      language = f77
      define_macros = [('NO_ATLAS_INFO', 1)]
  
  atlas_blas_threads_info:
    NOT AVAILABLE
  
  lapack_opt_info:
      libraries = ['lapack', 'blas']
      library_dirs = ['/usr/lib64']
      language = f77
      define_macros = [('NO_ATLAS_INFO', 1)]
  
  atlas_info:
    NOT AVAILABLE
  
  lapack_mkl_info:
    NOT AVAILABLE
  
  blas_mkl_info:
    NOT AVAILABLE
  
  atlas_blas_info:
    NOT AVAILABLE
  
  mkl_info:
    NOT AVAILABLE
  </code></pre>