11

I have used Scipy for some time. This is the first time I am using it for Signal processing! But when I import modules like

from scipy import signal
from scipy import special

I get the error:

ImportError: DLL load failed: The specified module could not be found.

I am using Python 2.7.3 with Scipy 0.12.0 on 32-Bit Windows.

What should I do ?

Animesh Pandey
  • 5,900
  • 13
  • 64
  • 130
  • where does your scipy installation come from? – ev-br Jul 05 '13 at 10:24
  • 1
    @Zhenya The current one is from [here](http://www.lfd.uci.edu/~gohlke/pythonlibs/). Initially, I was trying to install Scipy using `pip install` but I got some errors regarding BLAS/ATLAS libraries so, I opted for the binaries present in link cited above! – Animesh Pandey Jul 05 '13 at 10:49
  • (I don't have windows at the moment, so I can't check). Normally, Gohlke binaries should just work... Can you check if the needed files actually are present in your system? – ev-br Jul 05 '13 at 11:37

6 Answers6

40

This problem can be solved if instead of installing the usual numpy distribution, the numpy-MKL package is installed. This package is available here.

Do remove the previous installation before going with the new one!

Animesh Pandey
  • 5,900
  • 13
  • 64
  • 130
5

I already had numpy+mkl installed, but still I faced similar error. Reinstalling has solved the issue:

pip uninstall numpy-1.13.1+mkl-cp35-cp35m-win_amd64.whl
pip install numpy-1.13.1+mkl-cp35-cp35m-win_amd64.whl
Jumabek Alikhanov
  • 2,305
  • 3
  • 21
  • 21
3

I installed numpy-MKL from here for Python 3.5.1, but it didn't solve the problem until I added the folder C:\Program Files\Python35\Lib\site-packages\numpy\core to system path.

1

Similar to the OP, I already had the Intel MKL libraries installed on my system. I was unable to load scipy.linalg with the same error message. I uninstalled the old version of numpy and scipy (which I installed before installing the Intel compilers and math libraries). Then ran pip install scipy, and magically I could now import scipy.linalg without the error.

I'm not entirely sure what caused it, and why it was unable to find the library it needed. But it somehow fixed the problem for me on Python 3.7.1 with Anaconda.

AmphotericLewisAcid
  • 1,824
  • 9
  • 26
  • This did it for me too. The tutorial I was using said I needed to download the .whl files for Scipy and Numpy+MKL, then install using `pip3 install "numpy-1.17.3+mkl-cp37-cp37m-win_amd64.whl"`. However that failed. Uninstalling those and simply doing `pip3 install scipy` worked (I didn't need to install numpy separately) – BlueRaja - Danny Pflughoeft Oct 23 '19 at 06:39
1

I had an issue importing sklearn because of my Scipy installation. I fixed this by going to here and downloading the right version of numpy for my computer. Then I did the same for Scipy by going here and downloading the MKL version for my computer. Once I did that, everything worked!

To check the supported tags for wheel version for your system you can run the following command in the command prompt: pip debug --verbose. You can install the .whl files for numpy and scipy by doing: pip install {filename}.whl

Seiont
  • 59
  • 8
0

I had this issue on 3.6 and reinstalling didn't work,downloading the wheel didn't work. I found a solution that did work:

go to "site-packages/scipy" folder and open __init__.py file for editting. At the very bottom add this line of code:

from . import signal
from . import special
from . import linalg
from . import <insert missing submodule here>

this is the only solution that has worked for me and it should work for any one

jaredmt
  • 196
  • 2
  • 9