2014-02-27 43 views
1

我安裝了英特爾MKL和其他庫以獲得自定義numpy。這是我~/.numpy-site.cfg在安裝scipy時在MKL機器上找不到BLAS

[DEFAULT] 
library_dirs = /usr/lib:/usr/local/lib 
include_dirs = /usr/include:/usr/local/include 

[mkl] 
library_dirs = /opt/intel/mkl/lib/intel64/ 
include_dirs = /opt/intel/mkl/include/ 
mkl_libs = mkl_rt 
lapack_libs = 

[amd] 
amd_libs = amd 

[umfpack] 
umfpack_libs = umfpack 

[djbfft] 
include_dirs = /usr/local/djbfft/include 
library_dirs = /usr/local/djbfft/lib 

此配置文件中的安裝numpy的過程中,似乎確定。但是,當我通過pip3 install scipy安裝SciPy的,它報道了

numpy.distutils.system_info.BlasNotFoundError: 

    Blas (http://www.netlib.org/blas/) libraries not found. 

    Directories to search for the libraries can be specified in the 

    numpy/distutils/site.cfg file (section [blas]) or by setting 

    the BLAS environment variable. 

在我的腦海裏MKL是布拉斯的所以只是提MKL應罰款的實現。我試過

  1. export LD_LIBRARY_PATH=/opt/intel/mkl/lib/intel64:$LD_LIBRARY_PATH‌​
  2. export BLAS=/opt/intel/mkl/lib/intel64
  3. 複製在[mkl]部分的內容並粘貼到[blas]部分文件~/.numpy-site.cfg

但是,這些作品英寸那麼到底發生了什麼問題? scipy尊敬~/.numpy-site.cfg?謝謝。

回答

0

..../intel64你的庫中的擴展名是什麼?我遇到了類似的問題,因爲安裝腳本沒有找到庫的擴展名爲.so.3.0。我的解決方案是創建符號鏈接:https://stackoverflow.com/a/23325759/1430829。也許這也適用於你?

+0

擴展名爲'* .so'和'* .a'(如'libmkl_blas95_ilp64.a'和'libmkl_intel_ilp64.so')。 – ziyuang