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

刚才看到雷霄骅博士的博客才得知他在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

如图:

module compiled against API version 9 but this version of numpy is 7的解决方法_第1张图片

你可能感兴趣的:(Python,OpenCV)