尝试用以下方法解决这个问题:
pip install -U numpy但它仍然不起作用。
这就是当我尝试运行应用程序时控制台向我显示的内容:
RuntimeError: module compiled against API version 0xa but this version of numpy is 0x9
Traceback (most recent call last):
File "/Users/Rubio/Desktop/logistic-regression/train.py", line 8, in <module>
import cv2
File "/Library/Python/2.7/site-packages/cv2/__init__.py", line 3, in <module>
from .cv2 import *
ImportError: numpy.core.multiarray failed to import发布于 2018-11-23 16:50:54
重新安装OpenCV:
conda install -c anaconda opencv (for anaconda users)发布于 2019-03-09 14:06:39
我发现我的问题是我安装了两个版本的numpy,我卸载了其中一个,它工作正常。
发布于 2020-06-07 14:54:47
卸载并安装Numpy
conda uninstall numpy
conda install -c conda-forge numpy它起作用了
https://stackoverflow.com/questions/52243981
复制相似问题