import error: no module named cv2

When I tried to run ./,
it gives error
file "./", line 13,
import cv2
import error: no module named cv2
Can someone help me to fix this problem.


piborg's picture

You need to install the OpenCV library to be able to run the script.

The commands you need to do this are:

sudo apt-get update
sudo apt-get -y install libopencv-dev python-opencv
piborg's picture

There are a couple of changes you may also need to make to get the script to work properly:
AttributeError: 'module' object has no attribute 'cv'
Use a.any() or a.all() error

Subscribe to Comments for "import error: no module named cv2"