无法使用sklearn加载Iris数据集

时间:2015-05-24 07:41:12

标签: python scipy scikit-learn

我正在尝试在python 2.7中导入IRIS数据集但是会出现一系列错误。无法弄清楚我到底错过了什么..

from sklearn.datasets import load_iris
data = load_iris()

这给我以下错误:

Traceback (most recent call last):
  File "E:/Python_Projects/Machine learning/Iris_data(improved).py", line 5, in <module>
    from sklearn.datasets import load_iris
  File "C:\Python27\lib\site-packages\sklearn\datasets\__init__.py", line 7, in <module>
    from .base import load_diabetes
  File "C:\Python27\lib\site-packages\sklearn\datasets\base.py", line 24, in <module>
    from ..utils import check_random_state
  File "C:\Python27\lib\site-packages\sklearn\utils\__init__.py", line 16, in <module>
    from .class_weight import compute_class_weight, compute_sample_weight
  File "C:\Python27\lib\site-packages\sklearn\utils\class_weight.py", line 7, in <module>
    from ..utils.fixes import in1d
  File "C:\Python27\lib\site-packages\sklearn\utils\fixes.py", line 318, in <module>
    from scipy.sparse.linalg import lsqr as sparse_lsqr
  File "C:\Python27\lib\site-packages\scipy\sparse\linalg\__init__.py", line 109, in <module>
    from .isolve import *
  File "C:\Python27\lib\site-packages\scipy\sparse\linalg\isolve\__init__.py", line 6, in <module>
    from .iterative import *
  File "C:\Python27\lib\site-packages\scipy\sparse\linalg\isolve\iterative.py", line 7, in <module>
    from . import _iterative
ImportError: DLL load failed: %1 is not a valid Win32 application.

P.S .: 我使用的是Python 2.7(64位版本), scikit-learn(0.16.1), SciPy的(0.15.1)

0 个答案:

没有答案