[英]ImportError: DLL load failed: The specified module could not be found (sklearn)
I installed numpy, scipy and scikit-learn in Python 3.5.我在 Python 3.5 中安装了 numpy、scipy 和 scikit-learn。 When I run my program, I get this error.
当我运行我的程序时,我收到此错误。
Traceback (most recent call last):
File "D:/Dropbox/Cong Toan/Tools/NLP_Tools/doc_sim.py", line 1, in <module>
from sklearn.feature_extraction.text import TfidfVectorizer
File "C:\Python35-32\lib\site-packages\sklearn\__init__.py", line 57, in <module>
from .base import clone
File "C:\Python35-32\lib\site-packages\sklearn\base.py", line 11, in <module>
from .utils.fixes import signature
File "C:\Python35-32\lib\site-packages\sklearn\utils\__init__.py", line 11, in <module>
from .validation import (as_float_array,
File "C:\Python35-32\lib\site-packages\sklearn\utils\validation.py", line 16, in <module>
from ..utils.fixes import signature
File "C:\Python35-32\lib\site-packages\sklearn\utils\fixes.py", line 324, in <module>
from scipy.sparse.linalg import lsqr as sparse_lsqr
File "C:\Python35-32\lib\site-packages\scipy\sparse\linalg\__init__.py", line 112, in <module>
from .isolve import *
File "C:\Python35-32\lib\site-packages\scipy\sparse\linalg\isolve\__init__.py", line 6, in <module>
from .iterative import *
File "C:\Python35-32\lib\site-packages\scipy\sparse\linalg\isolve\iterative.py", line 7, in <module>
from . import _iterative
ImportError: DLL load failed: The specified module could not be found.
I have the same problem too, after days of searching and reinstalling almost every thing.我也有同样的问题,经过几天的搜索和重新安装几乎所有的事情。 I found out the answer:
我找到了答案:
Step 1: Uninstall scipy and numpy第 1 步:卸载 scipy 和 numpy
Step 2: Dowload numpy+mkl( the package name is numpy+mkl, not numpy package and mkl package) and scipy from this page as armatita mentioned第 2 步:从这个页面下载 numpy+mkl(包名是 numpy+mkl,不是 numpy 包和 mkl 包)和 scipy,如 armatita 所述
Step3: Install numpy+mkl first and scipy after that Step3:先安装numpy+mkl,然后安装scipy
Good luck to you祝你好运
It actually requires numpy
+ mkl
.它实际上需要
numpy
+ mkl
。 But it's difficult to say if that is the problem with your distribution.但是很难说这是否是您的发行版的问题。
My advice is that you use one of the available distributions that already bring those libraries.我的建议是您使用已经提供这些库的可用发行版之一。 I recommend WinPython , but I also heard good things about Anaconda .
我推荐WinPython ,但我也听说了有关Anaconda 的好消息。
It's easy to install other packages with WinPython using:使用 WinPython 安装其他软件包很容易:
Unofficial Windows Binaries for Python Extension Packages Python 扩展包的非官方 Windows 二进制文件
By Christoph Gohlke .克里斯托夫·戈尔克。
If you really want to solve that issue with your current distribution you'll have to provide more information such as versions that you installed, previous modules installed, and how you installed them.如果你真的想用你当前的发行版解决这个问题,你必须提供更多信息,比如你安装的版本、以前安装的模块以及你如何安装它们。
试试 Anaconda,它会解决你的问题。
卸载并重新安装 numpy 和 scipy,这为我解决了问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.