Tried to solve it with :
pip install -U numpy
but it still does not work.
That is what the console shows to me when I try to run the application :
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
The problem is that you might have created a file called numpy.py. This file might coincide with numpy library. So, delete that numpy.py file and the problem gets solved.
NumPy 1.21. 0 (release notes) – 22 Jun 2021. NumPy 1.20. 3 (release notes) – 10 May 2021.
Uninstall & Install Numpy
conda uninstall numpy
conda install -c conda-forge numpy
it works
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With