DLL Load Failed: The specified module could not be

2019-07-29 04:53发布

问题:

Not sure what the issue is...

...but many of the classifiers will not work on my machine now.

I just installed version 14.1 of scikit-learn. Could this be a path thing?

Traceback (most recent call last):
  File "hashtag.py", line 19, in <module>
    from sklearn.linear_model import SGDClassifier
  File "C:\Anaconda\lib\site-packages\scikit_learn-0.14.1-py2.7-win-amd64.egg\sk
learn\linear_model\__init__.py", line 24, in <module>
    from .logistic import LogisticRegression
  File "C:\Anaconda\lib\site-packages\scikit_learn-0.14.1-py2.7-win-amd64.egg\sk
learn\linear_model\logistic.py", line 5, in <module>
    from ..svm.base import BaseLibLinear
  File "C:\Anaconda\lib\site-packages\scikit_learn-0.14.1-py2.7-win-amd64.egg\sk
learn\svm\__init__.py", line 13, in <module>
    from .classes import SVC, NuSVC, SVR, NuSVR, OneClassSVM, LinearSVC
  File "C:\Anaconda\lib\site-packages\scikit_learn-0.14.1-py2.7-win-amd64.egg\sk
learn\svm\classes.py", line 1, in <module>
    from .base import BaseLibLinear, BaseSVC, BaseLibSVM
  File "C:\Anaconda\lib\site-packages\scikit_learn-0.14.1-py2.7-win-amd64.egg\sk
learn\svm\base.py", line 8, in <module>
    from . import libsvm, liblinear
**ImportError: DLL load failed: The specified module could not be found.**

C:\Users\Owner>

Thank you in advance with your help.

回答1:

Maybe there is a bug in the conda recipe / package. You can try to update conda and anaconda with:

conda update conda  # update the updater :)
conda update anaconda

If that does not work fix the issue, you can also try:

conda remove scikit-learn
conda install scikit-learn


回答2:

I fixed this with

pip install scipy -U