Pymc 4.0.0.b2 - fatal error: cblas.h

Seems like a bug, but before spamming the Issues, I thought I’d ask here:

In a conda environment for pymc4. When importing pymc, I’m getting the same error as shown in one of the newly compiled examples here:

/tmp/tmpmkdldsm2/source.c:1:10: fatal error: cblas.h: No such file or directory
 #include <cblas.h>
          ^~~~~~~~~
compilation terminated.

Inference seems to run ok, but obviously errors are not good. openblas is installed:

import numpy as np
np.show_config()

gives

blas_mkl_info:
  NOT AVAILABLE
blis_info:
  NOT AVAILABLE
openblas_info:
    libraries = ['openblas', 'openblas']
    library_dirs = ['/usr/local/lib']
    language = c
    define_macros = [('HAVE_CBLAS', None)]
    runtime_library_dirs = ['/usr/local/lib']
blas_opt_info:
    libraries = ['openblas', 'openblas']
    library_dirs = ['/usr/local/lib']
    language = c
    define_macros = [('HAVE_CBLAS', None)]
    runtime_library_dirs = ['/usr/local/lib']
lapack_mkl_info:
  NOT AVAILABLE
openblas_lapack_info:
    libraries = ['openblas', 'openblas']
    library_dirs = ['/usr/local/lib']
    language = c
    define_macros = [('HAVE_CBLAS', None)]
    runtime_library_dirs = ['/usr/local/lib']
lapack_opt_info:
    libraries = ['openblas', 'openblas']
    library_dirs = ['/usr/local/lib']
    language = c
    define_macros = [('HAVE_CBLAS', None)]
    runtime_library_dirs = ['/usr/local/lib']
Supported SIMD extensions in this NumPy install:
    baseline = SSE,SSE2,SSE3
    found = SSSE3,SSE41,POPCNT,SSE42,AVX,F16C,FMA3,AVX2
    not found = AVX512F,AVX512CD,AVX512_KNL,AVX512_KNM,AVX512_SKX,AVX512_CLX,AVX512_CNL,AVX512_ICL

Is it related to the latest scipy/numpy releases? CI is currently failing due to this, see Pin SciPy to `<1.8.0` by michaelosthege · Pull Request #5449 · pymc-devs/pymc · GitHub for more details

I don’t think it is. That problem reveals itself as

ImportError: cannot import name '_bvalfromboundary' from 'scipy.signal.signaltools'

which isn’t seen here.

I think that’s the error of scipy right cap but not numpy one. I wouldn’t trust matching of error messages here.

Try setting the same caps as in the PR and see if it works. (moreover the docs autoexecution broke at the exact same time the rest of CI, so the error matching the docs would seem to point to this)

can you try conda install -c conda-forge blas?

1 Like

You hit the nail on the head @twiecki !

It’s not listed in aeppl or aesara requirements.txt - should it be in one of these?

Great. Yes, it’s added for aesara: Add blas to dependencies. by twiecki · Pull Request #48 · conda-forge/aesara-feedstock · GitHub Should be fixed in the next pymc version.

1 Like

I’m also getting the error

ImportError: cannot import name '_bvalfromboundary' from 'scipy.signal.signaltools'

but I already have blas installed in my evironment.

The most recent update to scipy has broken some dependent packages (including aesara). The issue has been noted and a fix is coming. In the meantime, you can install a version of scipy that is <1.8 and (I think) this should take care of it.

1 Like

I had the same issue and this fixed it. Thank you @twiecki!

2 Likes