numpy.disutils.system_info.NotFoundError: no lapack/blas resources found

2024/10/7 12:28:24

Problem: Linking numpy to correct Linear Algebra libraries. Process is so complicated that I might be looking for the solution 6th time and I have no idea whats going wrong. I am on Ubuntu 12.04.5. I reinstalled blas and lapack and then reinstalled numpy using pip. I did that in system environment and then also tried in virtualenv environment. None of the things seem to be working.

Here is my numpy.__config__.show():

lapack_info:NOT AVAILABLE
lapack_opt_info:NOT AVAILABLE
openblas_lapack_info:NOT AVAILABLE
blas_info:NOT AVAILABLE
atlas_3_10_blas_threads_info:NOT AVAILABLE
atlas_threads_info:NOT AVAILABLE
blas_src_info:NOT AVAILABLE
atlas_3_10_threads_info:NOT AVAILABLE
atlas_blas_info:NOT AVAILABLE
atlas_3_10_blas_info:NOT AVAILABLE
lapack_src_info:NOT AVAILABLE
atlas_blas_threads_info:NOT AVAILABLE
openblas_info:NOT AVAILABLE
blas_mkl_info:NOT AVAILABLE
blas_opt_info:NOT AVAILABLE
atlas_info:NOT AVAILABLE
atlas_3_10_info:NOT AVAILABLE
lapack_mkl_info:NOT AVAILABLE
mkl_info:NOT AVAILABLE

This is a very common error and has lots of solution depending on the user's environment and history. I recently went through the whole process of installing BLAS and LAPACK as instructed here: https://stackoverflow.com/a/9173550/3413239. I was able to successfully install both.

However, I initially had these libraries: (ls /usr/lib | grep blas)

libopenblas.so.0
openblas-base/
libblas.so.3gf
libblas.3

How should I link my numpy to linear algebra libraries. Is it mandatory to have all the linaear algebra libraries? i.e. lapack, blas, atlas?

I am assuming once the numpy is linked all other modules like scipy and Orange will work.

Answer

It's possible that you have unmet dependencies. When I had this error, I was able to fix it by installing two packages:

sudo apt-get install libblas-dev  liblapack-dev
https://en.xdnf.cn/q/70248.html

Related Q&A

Opencv: Jetmap or colormap to grayscale, reverse applyColorMap()

To convert to colormap, I doimport cv2 im = cv2.imread(test.jpg, cv2.IMREAD_GRAYSCALE) im_color = cv2.applyColorMap(im, cv2.COLORMAP_JET) cv2.imwrite(colormap.jpg, im_color)Then,cv2.imread(colormap.jpg…

Get file modification time to nanosecond precision

I need to get the full nanosecond-precision modified timestamp for each file in a Python 2 program that walks the filesystem tree. I want to do this in Python itself, because spawning a new subprocess …

`TypeError: argument 2 must be a connection, cursor or None` in Psycopg2

I have a heroku pipeline set up, and have just enabled review apps for it. It is using the same codebase as my staging and production apps, same settings files and everything.When the review app spins …

replace string if length is less than x

I have a dataframe below. a = {Id: [ants, bees, cows, snakes, horses], 2nd Attempts: [10, 12, 15, 14, 0],3rd Attempts: [10, 10, 9, 11, 10]} a = pd.DataFrame(a) print (a)I want to able add text (-s) to …

Convert ast node into python object

Given an ast node that can be evaluated by itself, but is not literal enough for ast.literal_eval e.g. a list comprehensionsrc = [i**2 for i in range(10)] a = ast.parse(src)Now a.body[0] is an ast.Expr…

Keras custom loss function (elastic net)

Im try to code Elastic-Net. Its look likes:And I want to use this loss function into Keras:def nn_weather_model():ip_weather = Input(shape = (30, 38, 5))x_weather = BatchNormalization(name=weather1)(ip…

Django Models / SQLAlchemy are bloated! Any truly Pythonic DB models out there?

"Make things as simple as possible, but no simpler."Can we find the solution/s that fix the Python database world?Update: A lustdb prototype has been written by Alex Martelli - if you know a…

Fabric Sudo No Password Solution

This question is about best practices. Im running a deployment script with Fabric. My deployment user deploy needs sudo to restart services. So I am using the sudo function from fabric to run these com…

cartopy: higher resolution for great circle distance line

I am trying to plot a great circle distance between two points. I have found an in the cartopy docs (introductory_examples/01.great_circle.html):import matplotlib.pyplot as plt import cartopy.crs as cc…

Python Flask date update real-time

I am building a web app with Python Flask with JavaScript. I am a beginner of Javascript.The process I do now:In Flask Python code, 1. I get data by scrapping the web (numeric data that updates every m…