python3.4 sklearn安装陷阱

1、由于早期用python3.4研究pandas时,顺便安装了numpy,当时安装的是numpy 1.12.0rc2+mkl,而这次我打算自己研究sklearn程序,发现安装了sklearn '0.19.2'后,import sklearn 异常

D:\Python34\Scripts>python
Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sklearn
Traceback (most recent call last):
  File "__init__.pxd", line 998, in numpy.import_array
RuntimeError: module compiled against API version 0xc but this version of numpy is 0xa

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\Python34\lib\site-packages\sklearn\__init__.py", line 134, in <module>
    from .base import clone
  File "D:\Python34\lib\site-packages\sklearn\base.py", line 13, in <module>
    from .utils.fixes import signature
  File "D:\Python34\lib\site-packages\sklearn\utils\__init__.py", line 9, in <module>
    from .murmurhash import murmurhash3_32
  File "sklearn\utils\murmurhash.pyx", line 26, in init sklearn.utils.murmurhash
  File "__init__.pxd", line 1000, in numpy.import_array
ImportError: numpy.core.multiarray failed to import
>>> import scipy
>>> import numpy
>>> import sklearn
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\Python34\lib\site-packages\sklearn\__init__.py", line 133, in <module>
    from . import __check_build
ImportError: cannot import name '__check_build'

经定位是numpy+mkl版本太低了需要安装numpy-1.14.5+mkl-cp34-cp34m-win32

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值