python如何升级numpy_python – 如何升级numpy?

当我使用brew安装OpenCV时,每当我运行这个命令来测试python -c“import cv2”时,我得到这个问题

RuntimeError: module compiled against API version 9 but this version of numpy is 6

Traceback (most recent call last):

File "", line 1, in

ImportError: numpy.core.multiarray failed to import

我试图升级麻烦,但这是令人困惑的

>>> import numpy

>>> print numpy.__version__

1.6.1

当我运行brew升级numpy,我有这个问题。

brew install -u numpy

Warning: numpy-1.9.1 already installed

当我卸载它

sudo pip install numpy

Requirement already satisfied (use --upgrade to upgrade): numpy in ./anaconda/lib/python2.7/site-packages

我跟着这个thread,从我的mac中删除了anaconda。

pip install numpy

Requirement already satisfied (use --upgrade to upgrade): numpy in /Library/Python/2.7/site-packages

但没有改变。如何将numpy版本链接到opencv?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值