0
votes

I I'm following this tutorial to start with YOLOV4: https://www.youtube.com/watch?v=5pYh1rFnNZs

But when trying to import OpenCV with "import cv2" in python terminal the following message appears:

** On entry to DGEBAL parameter number  3 had an illegal value
** On entry to DGEHRD  parameter number  2 had an illegal value
** On entry to DORGHR DORGQR parameter number  2 had an illegal value
** On entry to DHSEQR parameter number  4 had an illegal value
ImportError: numpy.core.multiarray failed to import
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\LUCINALDO\AppData\Local\Programs\Python\Python37\lib\site-packages\cv2\__init__.py", line 5, in <module>
from .cv2 import *
ImportError: numpy.core.multiarray failed to import

I already tried to update numpy, OpenCV or install other libraries but the error persists. What am I doing wrong?

2

2 Answers

1
votes

Your numpy is not up to date or the problem is might be related with your pip version, so you need to upgrade it or delete it and install it again. You can make it via typing to terminal tha commands below in order.

pip install --upgrade pip

and then

pip uninstall numpy
pip install numpy

If you are using Mac OS you can try this one too

python3 -m pip install numpy -I 

If you are using Ubuntu try this one

pip3 uninstall numpy
sudo apt-get install python3-numpy
1
votes

I found out! For some reason the numpy 1.19.4 version has some bug on windows, just uninstall and install a previous version

pip uninstall numpy

and then

pip install numpy==1.19.3

As this source guided: https://github.com/twintproject/twint/issues/1030