RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa

2021-05-08 00:27

阅读:621

标签:multi   cal   碎片   环境搭建   std   erro   anaconda   报错   failed   

两个python,一个是本机自带的,一个是anaconda。先前呢,用自带的安装了Opencv,由于自带的python,对应的numpy版本是13,

而anaconda对应的版本是12,导致import 报错:

>>> import cv2
RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa
Traceback (most recent call last):
File "", line 1, in
ImportError: numpy.core.multiarray failed to import
>>> import numpy
>>> exit()

 

然后,升级一下numpy就可以了。

pip install numpy --upgrade

 

这些都是些小碎片。整理一下给大家。帮助大家节约环境搭建的时间。

RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa

标签:multi   cal   碎片   环境搭建   std   erro   anaconda   报错   failed   

原文地址:http://www.cnblogs.com/whu-zeng/p/7638188.html


评论


亲,登录后才可以留言!