DLL Load Failed: The specified module could not be found [Python]

妖精的绣舞 提交于 2019-12-13 01:50:12

问题


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


来源:https://stackoverflow.com/questions/20308451/dll-load-failed-the-specified-module-could-not-be-found-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!