1

I am trying to run this code:

import cv2

img=cv2.imread("1.jpg")
cv2.imshow("image",img)
cv2.waitkey(0)
cv2.destroyAllWindows()

The problem I keep getting is this error report:

 from .cv2 import *
ImportError: numpy.core.multiarray failed to import

& i'am also installed opencv-python for cv2 cv2 is working. but i can't use cv2.imread()

Could you please help me?

Ganesh Dev
  • 19
  • 2
  • 6

1 Answers1

0

Maybe that's because your'e using bad version of numpy. You can fix it like this:

python3 -m pip install numpy -I 

Please check the compatible version for your platform and reinstall it specifying the version number in above command.

ppwater
  • 2,315
  • 4
  • 15
  • 29
Shashishekhar Hasabnis
  • 1,636
  • 1
  • 15
  • 36