Skip to content
Advertisement

Why do I get this import error when I have the required DLLs?

from sklearn.feature_extraction.text import CountVectorizer

getting this error

 from sklearn.feature_extraction.text import CountVectorizer

  File "C:UsersAnaconda3libsite-packagessklearn__init__.py", line 57, in <module>
    from .base import clone

  File "C:UsersAnaconda3libsite-packagessklearnbase.py", line 12, in <module>
    from .utils.fixes import signature

  File "C:UsersAnaconda3libsite-packagessklearnutils__init__.py", line 11, in <module>
    from .validation import (as_float_array,

  File "C:UsersAnaconda3libsite-packagessklearnutilsvalidation.py", line 18, in <module>
    from ..utils.fixes import signature

  File "C:Users\Anaconda3libsite-packagessklearnutilsfixes.py", line 291, in <module>
    from scipy.sparse.linalg import lsqr as sparse_lsqr


    from .eigen import *

  File "C:UsersAnaconda3libsite-packagesscipysparselinalgeigen__init__.py", line 11, in <module>
    from .arpack import *

  File "C:UsersAnaconda3libsite-packagesscipysparselinalgeigenarpack__init__.py", line 22, in <module>
    from .arpack import *

  File "C:UsersAnaconda3libsite-packagesscipysparselinalgeigenarpackarpack.py", line 45, in <module>
    from . import _arpack

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

Advertisement

Answer

According to this github issue https://github.com/hmmlearn/hmmlearn/issues/87

“The solution is to install mkl.”

conda install mkl

General advice in case like this is to google last two lines of the stack trace, usually you will find a github or similar thread about it.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement