Python scipy needs BLAS? (無法安裝 imagehash lib python)

From: http://stackoverflow.com/questions/7496547/python-scipy-needs-blas

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.

I guess you are talking about installation in ubuntu. Just use:

apt-get install python-numpy python-scipy
That should take care of the blas libraries compiling as well. Else, compiling blas libraries is very difficult.

If you need to use latest versions of Scipy rather than the packaged version, without going through the hassle of building BLAS and LAPACK, you can follow the below procedure.

Install linear algebra libraries from repository, (for Ubuntu)

sudo apt-get install gfortran libopenblas-dev liblapack-dev

Then install Scipy, (after downloading Scipy source) python setup.py install or

pip install scipy
As the case may be.

On Fedora, this works:

yum install f2py lapack lapack-devel blas blas-devel
pip install numpy
pip install scipy

Remember to install ‘lapack-devel’ and ‘blas-devel’ in addition to ‘blas’ and ‘lapack’ otherwise you’ll get the error you mentioned or the “numpy.distutils.system_info.LapackNotFoundError" error.

Advertisements

發表迴響

在下方填入你的資料或按右方圖示以社群網站登入:

WordPress.com Logo

您的留言將使用 WordPress.com 帳號。 登出 / 變更 )

Twitter picture

您的留言將使用 Twitter 帳號。 登出 / 變更 )

Facebook照片

您的留言將使用 Facebook 帳號。 登出 / 變更 )

Google+ photo

您的留言將使用 Google+ 帳號。 登出 / 變更 )

連結到 %s