title: Checking BLAS and LAPACK libraries links in scipy and numpy
body: <p>I'm trying to link my code (scipy.linalg.solve notably) to a given library like OpenBLAS.</p>
  <p>I am using python 3.7.7 in a virtual environment:</p>
  <pre><code>Python 3.7.7 (default, Mar 29 2020, 18:12:06) 
  [Clang 11.0.3 (clang-1103.0.32.29)] on darwin
  </code></pre>
  <p>Also of note, I installed numpy and scipy into my virtual environment using pip</p>
  <pre><code>pip install numpy
  pip install scipy
  
  
  &gt;&gt;&gt; scipy.__version__
  '1.4.1'
  
  &gt;&gt;&gt; numpy.__version__
  '1.18.0'
  
  &gt;&gt;&gt; scipy.show_config()
  lapack_mkl_info:
      NOT AVAILABLE
  openblas_lapack_info:
      libraries = ['openblas', 'openblas']
      library_dirs = ['/usr/local/lib']
      language = c
      define_macros = [('HAVE_CBLAS', None)]
  lapack_opt_info:
      libraries = ['openblas', 'openblas']
      library_dirs = ['/usr/local/lib']
      language = c
      define_macros = [('HAVE_CBLAS', None)]
  blas_mkl_info:
      NOT AVAILABLE
  blis_info:
      NOT AVAILABLE
  openblas_info:
      libraries = ['openblas', 'openblas']
      library_dirs = ['/usr/local/lib']
      language = c
      define_macros = [('HAVE_CBLAS', None)]
  blas_opt_info:
      libraries = ['openblas', 'openblas']
      library_dirs = ['/usr/local/lib']
      language = c
      define_macros = [('HAVE_CBLAS', None)]
  
  &gt;&gt;&gt; numpy.show_config()
  lapack_mkl_info:
      NOT AVAILABLE
  openblas_lapack_info:
      libraries = ['openblas', 'openblas']
      library_dirs = ['/usr/local/lib']
      language = c
      define_macros = [('HAVE_CBLAS', None)]
  lapack_opt_info:
      libraries = ['openblas', 'openblas']
      library_dirs = ['/usr/local/lib']
      language = c
      define_macros = [('HAVE_CBLAS', None)]
  blas_mkl_info:
      NOT AVAILABLE
  blis_info:
      NOT AVAILABLE
  openblas_info:
      libraries = ['openblas', 'openblas']
      library_dirs = ['/usr/local/lib']
      language = c
      define_macros = [('HAVE_CBLAS', None)]
  blas_opt_info:
      libraries = ['openblas', 'openblas']
      library_dirs = ['/usr/local/lib']
      language = c
      define_macros = [('HAVE_CBLAS', None)]
  </code></pre>
  <p>When I do:</p>
  <pre><code>$ brew install openblas
  Warning: openblas 0.3.9 is already installed and up-to-date
  </code></pre>
  <p>I have OpenBLAS, and my scipy/numpy tells me that they are linked to it. However, when I do:</p>
  <pre><code>from numpy.distutils.system_info import get_info
  info = get_info('blas_opt')
  print(info)
  </code></pre>
  <p>I then get:</p>
  <pre><code>{'extra_compile_args': ['-msse3', '-I/System/Library/Frameworks/vecLib.framework/Headers'], 'extra_link_args': ['-Wl,-framework', '-Wl,Accelerate'], 'define_macros': [('NO_ATLAS_INFO', 3), ('HAVE_CBLAS', None)]}
  </code></pre>
  <p>It still tries to use the Accelerate library and not use OpenBLAS.</p>
  <p>If I look at some links in the numpy package:</p>
  <pre><code>$ otool -L ~/.virtualenvs/myvenv/lib/python3.7/site-packages/numpy/core/_multiarray_umath.cpython-37m-darwin.so 
  
  /Users/myself/.virtualenvs/myvenv/lib/python3.7/site-packages/numpy/core/_multiarray_umath.cpython-37m-darwin.so:
  @loader_path/../.dylibs/libopenblasp-r0.3.7.dylib (compatibility version 0.0.0, current version 0.0.0)
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)
  </code></pre>
  <p>There it does tell me it links to OpenBLAS.</p>
  <p>So, anyone knows what's going on here? What step do I need to take in order to use the OpenBLAS?</p>