Error importing scikit-learn modules

后端 未结 9 882
盖世英雄少女心
盖世英雄少女心 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:47

    I struggled trying to figure this one out; tried to download and install the (unofficial) Numpy+MKL library from the website (risky/tedious?).

    Ultimately found success by:

    1. Login to command prompt using admin rights; how to here: https://superuser.com/questions/968214/open-cmd-as-admin-with-windowsr-shortcut

    2. Uninstall existing/tangled version of Scipy & Numpy pip uninstall scipy pip uninstall numpy

    3. Fresh install Scipy & Numpy pip install scipy pip install numpy

    4. Run Jupyter notebook; it worked for me.

    The message ImportError: DLL load failed: The specified module could not be found informs that there is failure to identify and source the required DLL(s) to use the scikit-learn library; a fresh install of scipy/numpy probably enables a better routing of DLL connections called from Jupyter notebook code(s).

提交回复
热议问题