I am new to scikit-learn. I went through the examples given in the docs and I downloaded the script for recognizing images of hand-written digits. When I made the script to run on my laptop, I got the following errors:

Traceback (most recent call last):
   File "C:\Python34\plot_digits_classification.py", line 22, in <module>
    from sklearn import datasets, svm, metrics
    File "C:\Python34\lib\site-packages\sklearn\__init__.py", line 57, in<module>
    from .base import clone
   File "C:\Python34\lib\site-packages\sklearn\base.py", line 11, in <module>
  from .utils.fixes import signature
  File "C:\Python34\lib\site-packages\sklearn\utils\__init__.py", line 11, in <module>
   from .validation import (as_float_array,
   File "C:\Python34\lib\site-packages\sklearn\utils\validation.py", line 16, in <module>
   from ..utils.fixes import signature
  File "C:\Python34\lib\site-packages\sklearn\utils\fixes.py", line 324, in <module>
   from scipy.sparse.linalg import lsqr as sparse_lsqr
   File "C:\Python34\lib\site-packages\scipy\sparse\linalg\__init__.py", line 109, in <module>
   from .isolve import *
  File "C:\Python34\lib\site-packages\scipy\sparse\linalg\isolve\__init__.py", line 6, in <module>
  from .iterative import *
  File "C:\Python34\lib\site-packages\scipy\sparse\linalg\isolve\iterative.py", line 7, in <module>
  from . import _iterative
  ImportError: DLL load failed: The specified module could not be found.

Please help me. Also, I want to know if I want to load data for prediction, how should I do that? For example, if I want to test a hand written digit that is stored somewhere on my disk, how to prepare that data for loading and passing into this model for prediction?

  • $\begingroup$ Can you add the code you're trying to run ? $\endgroup$
    – Rad
    Commented Feb 14, 2016 at 7:52

2 Answers 2


Seems like you've got to install the module, for example with the pip package manager. Perhaps you could install anaconda, which is highly recommended

  • $\begingroup$ installed already $\endgroup$
    – enterML
    Commented Jan 14, 2016 at 18:12
  • 1
    $\begingroup$ Got more than one python install, an older one not in path? $\endgroup$ Commented Jan 14, 2016 at 18:13

I installed older version of numpy,that's the problem. If you have installed scikit-learn using windows binaries, then you must first install numpy+mkl from the windows binaries site. It is a prerequisite for scikit-learn.

  • 1
    $\begingroup$ Maybe try the Anaconda Python distribution (continuum.io/downloads). It's got a great package manager that takes care of all dependency problems. $\endgroup$
    – stmax
    Commented Jan 15, 2016 at 13:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.