Module 'cv2' has no 'imread' member

asked 2019-04-12 15:01:36 -0500

I imported cv2 successfully, but keep getting this message when I try to use imread. I've tested this on Spyder and VS Code (through Anaconda) and on Thonny, and always got the same message. I've tried just about everything I've seen suggested online to no avail. What's going on?image description

Windows 10, Anaconda version 2019.03

edit retag flag offensive close merge delete



In VS Code, press Ctrl+Shift+p, then make sure you have the correct python environment selected in which you installed OpenCV (pip install opencv-python)

phillity gravatar imagephillity ( 2019-04-13 10:05:18 -0500 )edit

Not really related to OpenCV, but more to how you correctly setup your environment...

StevenPuttemans gravatar imageStevenPuttemans ( 2019-04-15 04:58:26 -0500 )edit