module compiled against API version 9 but this version of numpy is 7的解决方法

来源:互联网 发布:sql中minus 编辑:程序博客网 时间:2024/05/21 09:25

刚才看到雷霄骅博士的博客才得知他在17号走了,英才早逝,可惜啊。希望他一路走好。

————————————————————————————————————————————————————————————————————————————

我使用python和OpenCV时出现的错误:


>>> import numpy
>>> import cv2
RuntimeError: module compiled against API version 9 but this version of numpy is 7

解决方案:

到SourceForge中下载9版本的numpy

https://sourceforge.net/projects/numpy/?source=typ_redirect

或者直接使用pip升级

pip install numpy --upgrade

如图:


0 0