python显示找不到指定模块,DLL加载失败:找不到指定的模块[Python]

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

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

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

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

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

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

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.

解决方案

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
当在Python中出现"ImportError: DLL load failed: 不到指定模块"错误时,通常是由于无法到所需的动态链接库(DLL)文件导致的。这个错误可能有多种原因,下面是一些常见的解决方法: 1. 检查模块是否正确安装:首先确保你已经正确地安装了需要导入的模块。可以使用pip命令来安装模块,例如:`pip install 模块名`。如果已经安装了模块,可以尝试重新安装它,可能会修复一些问题。 2. 检查环境变量:确保你的环境变量配置正确。有时候,Python无法到所需的DLL文件是因为路径没有正确添加到环境变量中。你可以检查系统的环境变量,确保包含了Python和所需模块的路径。 3. 检查依赖项:某些模块可能依赖于其他的库或软件包。确保你已经正确地安装了这些依赖项,并且它们的版本与模块要求的版本兼容。 4. 检查操作系统位数:如果你的操作系统是64位的,而你安装的Python是32位的,或者反之,可能会导致DLL加载失败。确保你的Python和操作系统位数匹配。 5. 更新Python版本:有时候,某些模块可能与特定版本的Python不兼容。尝试更新Python到最新版本,或者降级到与模块兼容的版本。 6. 检查DLL文件是否存在:最后,确保所需的DLL文件存在于系统中,并且路径正确。如果DLL文件确实缺失,你可以尝试重新安装模块或者从其他可靠来源获取正确的DLL文件。 希望以上解决方法能够帮助你解决"ImportError: DLL load failed: 不到指定模块"错误。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值