I wanted to test some signal processing and statistics using SciPy.
So I had to use scipy.signal
and scipy.stats
, but I always used to get an error:
ImportError: DLL load failed: The specified module could not be found.
I was using Numpy 1.7.1, scipy 0.12 and Python 2.7.3. I checked on the internet and asked about it on other forums too! This problem got solved when switched my Numpy distribution with the Numpy-MKL distribution.
I want to know the difference between the two libraries ?
NumPy doesn't depend on any other Python packages, however, it does depend on an accelerated linear algebra library - typically Intel MKL or OpenBLAS.
The Intel Math Kernel Library (MKL) is a cross-platform framework that contains highly optimized math routines for common computations such as vector mathematics, linear algebra, statistics, and Fourier transformations. Other software packages can utilize this library to provide efficient and optimized computations.
MKL 2022 is essentially the fastest in all three benchmarks—with a particularly noticable lead in eigenvalue computation—while OpenBLAS is barely competitive with MKL 2019. The importance of the Intel CPU workaround is very apparent, without which MKL would be slower than OpenBLAS when run on AMD CPUs.
According to the answers to this stackoverflow question the only way to check if Numpy is using the system BLAS/LAPACK is to inspect the output of ldd on some library belonging to numpy hidden deep in the filesystem.
Numpy and scipy rely on lower level fortran libraries such as BLAS and lapack to perform many of their functions. These libraries come in many different versions, including the highly portable ones available from netlib, and other which are optimised for particular systems. In particular, Intel has one called "MKL" - Intel Math Kernel Library. So numpy-mkl just means a version of numpy compiled against the MKL fortran library.
Probably whichever version of numpy you previously had installed was somehow broken, and couldn't find the libraries it needed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With