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

November 4, 2021, 1:53pm 1

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?

twiecki November 4, 2021, 6:47pm 2

dbf_94 November 5, 2021, 9:23am 3

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

twiecki November 5, 2021, 10:01am 4

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

dbf_94 November 5, 2021, 3:55pm 5

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.

twiecki November 7, 2021, 8:16pm 6

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

aetius January 21, 2022, 2:39am 7

I think this post can solve your problem.

klfow January 27, 2022, 3:26am 8

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*

dchu1991 January 28, 2022, 9:03am 9

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.

klfow February 8, 2022, 8:53am 10

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

Igor_K April 26, 2022, 12:28am 11

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?

twiecki April 29, 2022, 1:31pm 12

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

Igor_K April 29, 2022, 2:40pm 13

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)

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…