Fixing numpy.distutils.system_info.NotFoundError: No lapack/blas resources
Note: If you are on Windows, you can not install scipy using pip! Follow this guide instead: https://www.scipy.org/install.html. This blog post is only for Linux-based systems!
When building some of my libraries on Travis, I encountered this error during
install_numpy_scipy.sh
pip install numpy scipy --upgrade
numpy_error.txt
numpy.distutils.system_info.NotFoundError: No lapack/blas resources
Solution
Install lapack and blas:
install_lapack_blas.sh
sudo apt-get -y install liblapack-dev libblas-dev
In most cases you will then get this error message:
dfftpack_error.txt
error: library dfftpack has Fortran sources but no Fortran compiler found
Fix that by
install_gfortran.sh
sudo apt-get install -y gfortran
In Travis, you can do it like this in .travis.yml
:
.travis.yml
before_install:
- sudo apt-get -y install liblapack-dev libblas-dev gfortran
Check out similar posts by category:
Build Systems, Linux
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow