Python Sklearn导入错误

时间:2017-02-17 10:48:19

标签: python-3.x scikit-learn

我是python中机器学习库的新手。我已经安装了' python 3.4'。 我还从wheel文件中安装了scikit-learnnumpyscipy

scikit_learn-0.18.1-cp34-none-win_amd64
scipy-0.16.0-cp34-none-win_amd64
numpy-1.9.2-cp34-none-win_amd64.whl

import scipy
import numpy

以上声明工作正常。但是当我尝试执行import sklearn

我得到以下错误

Traceback (most recent call last):
  File "C:\Users\Usman\Desktop\hello_python.py", line 1, in <module>
    import sklearn
  File "C:\Python34\Lib\site-packages\sklearn\__init__.py", line 57, in <module>
    from .base import clone
  File "C:\Python34\Lib\site-packages\sklearn\base.py", line 12, in <module>
    from .utils.fixes import signature
  File "C:\Python34\Lib\site-packages\sklearn\utils\__init__.py", line 10, in <module>
    from .murmurhash import murmurhash3_32
  File "__init__.pxd", line 155, in init sklearn.utils.murmurhash (sklearn\utils\murmurhash.c:6319)
ValueError: numpy.dtype has the wrong size, try recompiling. Expected 88, got 96

- 编辑 当我从python shell执行import sklearn时,我得到以下错误

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python34\Lib\site-packages\sklearn\__init__.py", line 56, in <module>

    from . import __check_build
ImportError: cannot import name '__check_build'

我已经搜索过但无法找到任何有用的信息。请帮我删除此错误。

0 个答案:

没有答案