我在这一行收到此错误:
from sklearn.ensemble import RandomForestClassifier
错误日志是:
Traceback (most recent call last):
File "C:\workspace\KaggleDigits\KaggleDigits.py", line 5, in <module>
from sklearn.ensemble import RandomForestClassifier
File "C:\Python27\lib\site-packages\sklearn\ensemble\__init__.py", line 7, in <module>
from .forest import RandomForestClassifier
File "C:\Python27\lib\site-packages\sklearn\ensemble\forest.py", line 47, in <module>
from ..feature_selection.selector_mixin import SelectorMixin
File "C:\Python27\lib\site-packages\sklearn\feature_selection\__init__.py", line 7, in <module>
from .univariate_selection import chi2
File "C:\Python27\lib\site-packages\sklearn\feature_selection\univariate_selection.py", line 13, in <module>
from scipy import stats
File "C:\Python27\lib\site-packages\scipy\stats\__init__.py", line 320, in <module>
from .stats import *
File "C:\Python27\lib\site-packages\scipy\stats\stats.py", line 241, in <module>
import scipy.special as special
File "C:\Python27\lib\site-packages\scipy\special\__init__.py", line 529, in <module>
from ._ufuncs import *
ImportError: DLL load failed: The specified module could not be found.
安装后:
- 适用于 Windows x86-64 的 Python 2.7.4
- scipy-0.12.0.win-amd64-py2.7.exe(从这里)
- numpy-unoptimized-1.7.1.win-amd64-py2.7.exe(从这里)
- scikit-learn-0.13.1.win-amd64-py2.7.exe(从这里)
有人知道为什么会发生这种情况以及如何解决吗?