Error importing scikit-learn modules

后端 未结 9 876
盖世英雄少女心
盖世英雄少女心 2020-11-28 13:07

I\'m trying to call a function from the cluster module, like so:

import sklearn
db = sklearn.cluster.DBSCAN()

and I get the following error

9条回答
  •  情书的邮戳
    2020-11-28 13:45

    From the error log, it shows that scipy module is the most recent module fails to import

      File "C:\Python34\lib\site-packages\sklearn\utils\fixes.py", line 318, in 
        from scipy.sparse.linalg import lsqr as sparse_lsqr
      File "C:\Python34\lib\site-packages\scipy\sparse\linalg\__init__.py", line 109, in 
        from .isolve import *
      File "C:\Python34\lib\site-packages\scipy\sparse\linalg\isolve\__init__.py", line 6, in 
        from .iterative import *
      File "C:\Python34\lib\site-packages\scipy\sparse\linalg\isolve\iterative.py", line 7, in 
        from . import _iterative
    ImportError: DLL load failed: The specified module could not be found.
    

    I have the same error that show the same log, the problem'd gone when I uninstall/install scipy:

    pip uninstall scipy
    pip install scipy
    

提交回复
热议问题