我在Python 3.5中安装了numpy,scipy和scikit-learn。运行程序时,出现此错误。
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.
最佳答案
它实际上需要numpy
+ mkl
。但是很难说这是否是您的发行问题。
我的建议是您使用已经带那些库的可用发行版之一。我推荐WinPython,但我也听说过有关Anaconda的好消息。
使用WinPython安装其他软件包很容易:
Unofficial Windows Binaries for Python Extension Packages
通过Christoph Gohlke。
如果您确实想用当前发行版解决该问题,则必须提供更多信息,例如您安装的版本,先前安装的模块以及安装方式。
关于python - ImportError:DLL加载失败:找不到指定的模块(sklearn),我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/36894322/