Ask Your Question

PackageNotFoundError: cblas not found

asked 2021-08-21 18:24:36 +0200

anonym485738 gravatar image

updated 2021-08-23 14:29:18 +0200

slelievre gravatar image

On a computer with operating system macOS 12.0 beta, I installed Sage 9.2 from conda-forge.

The installation succeeded, and Sage starts properly.

Running a .sage file that includes the command

sage.repl.load.load("program.pyx", globals())

gives the following error message:

File "/Users/*****/opt/anaconda3/envs/sage/lib/python3.8/site-packages/sage/repl/", line 276, in load
    exec(load_cython(fpath), globals)
File "/Users/*****/opt/anaconda3/envs/sage/lib/python3.8/site-packages/sage/repl/", line 67, in load_cython
    mod, dir = cython(name, compile_message=True, use_cache=True)
File "/Users/*****/opt/anaconda3/envs/sage/lib/python3.8/site-packages/sage/misc/", line 331, in cython
File "/Users/*****/opt/anaconda3/envs/sage/lib/python3.8/site-packages/sage/", line 406, in cython_aliases
    aliases[var + "CFLAGS"] = pkgconfig.cflags(lib).split()
File "/Users/*****/opt/anaconda3/envs/sage/lib/python3.8/site-packages/pkgconfig/", line 144, in cflags
File "/Users/*****/opt/anaconda3/envs/sage/lib/python3.8/site-packages/pkgconfig/", line 103, in _raise_if_not_exists
    raise PackageNotFoundError(package)
pkgconfig.pkgconfig.PackageNotFoundError: cblas not found

How to handle it? I tried to install it with anaconda and pip, but both haven't found the package.

edit retag flag offensive close merge delete


Can you say what operating system this is? I'm guessing macOS, but which one?

How was Sage installed? What version? How was it started?

Does this error message appear when trying to start Sage?

If Sage starts properly, what command causes this error message to appear?

slelievre gravatar imageslelievre ( 2021-08-22 23:50:41 +0200 )edit

The OS is MacOS 12.0 beta. I installed Sage from conda-forge. It's version 9.2. It starts properly, the error appears by calling sage.repl.load.load("program.pyx", globals()) in a .sage file.

anonym485738 gravatar imageanonym485738 ( 2021-08-23 12:16:24 +0200 )edit

What do you get with conda list -n sage? Do you have a file at /Users/*****/opt/anaconda3/envs/sage/lib/pkgconfig/cblas.pc?

isuruf gravatar imageisuruf ( 2021-08-23 15:07:41 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2021-08-23 15:08:06 +0200

isuruf gravatar image

updated 2021-08-23 15:08:17 +0200

Can you try doing,

conda install blas-devel ?

edit flag offensive delete link more


Thank you! Conda install blas-devel solved the error

anonym485738 gravatar imageanonym485738 ( 2021-08-23 20:28:30 +0200 )edit

@anonym485738 - to mark your question as solved, accept the answer by clicking the check mark button next to it.

slelievre gravatar imageslelievre ( 2021-08-24 02:14:10 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2021-08-21 18:24:36 +0200

Seen: 93 times

Last updated: Aug 23 '21