Installation guide issue - WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions

Hello, I have followed exactly the instructions here Installation Guide (Windows) · pymc-devs/pymc Wiki · GitHub to install pymc3 on Windows, but I still get the following when I import the library:

WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.

I also have installed g++ and added it to the environmental variables as explained here: Installing c++/g++ on Windows (stonybrook.edu)

How can I solve this?

I think this was solved here: Exception: ('Compilation failed (return status=1) · Issue #5107 · pymc-devs/pymc · GitHub

Hi twiecki, I have had a look and it does not seem the have been able to get rid of the BLAS warning.

OK, I don’t think it really matters, you can just continue if everything else seems to work fine.

Ok, unfortunately I’m encountering the same problem which is described here Exception: ('Compilation failed (return status=1) · Issue #5107 · pymc-devs/pymc · GitHub (The compilation error). I have tried to follow the steps detailed there, but no solution. It seems it’s a common problem people have been experiencing lately, but I cannot find anything helpful.

Can you comment on that issue with the steps you took and the error you are getting?

I think this post can solve your problem.

I also encountered this warning (WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.) after following the instructions for installing pymc3 on Windows.

I took the following steps to get rid of the warning:

  1. Create a text file with the following content:

[blas]
ldflags=-lmkl_rt

  1. Save the text file as .theanorc.txt, and place it under C:\Users*username*
5 Likes

Hi @klfow

I’ve tried you’re solution on pymc v4.0.0b2 and added your content to .aesararc.txt
it was successful at removing the error message at first, then I ran into a problem while running the introductory notebook, where my windows computer complained when sampling the test_score_model, saying it could find -lmkl_rt.

here’s the partial error message

CompileError: Compilation failed (return status=1):
...
C:/Users/<truncated>/x86_64-w64-mingw32/bin/ld.exe: cannot find -lmkl_rt
collect2.exe: error: ld returned 1 exit status

I did find a related discussion here but I don’t think the most voted answer directly applies to the windows system, since ld.exe doesn’t print anything to the console on powershell…

I’ll continue to search for solutions, will report if found any.

I have pymc3 v3.11.4 installed with theano-pymc v1.1.2, blas, mkl and mkl-service. You can try to install these libraries:
conda install mkl
conda install mkl-service
conda install blas

I just used your advice to resolve a BLAS warning after pymc v4 install by creating .aesararc.txt file according to your specifications - thank you!!! Can you explain what is going on here and why it works?

@igor_k can you share your .aesararcrc.txt here?

Sure thing, here it is. Note that the filename is “.aesararc.txt”, it needs to be put here: C:\Users\User_Name\

.aesararc.txt (24 Bytes)

1 Like

I believe I’ve found before that simply having a [blas] section in .aesarac/.theanorc gets rid of the warning, but this happens no matter what (if any) BLAS setup I have:

[blas]
ldflags=-lmkl_rt
[blas]
ldflags=-lblas

Made-up flag

[blas]
ldflags=-blah

@dchu1991 I think your issue has been solved by @lucianopaz 's Pull Request 947 in aesara.

I also got the CompileError you showed recently, but I’m not sure why I never got it before. Recently I started trying Anaconda + pymcv4/aesara + different compiler toolchain. So, it somehow wasn’t an issue for me before…

1 Like