This error may occur if you didn't install opencv module in your system. So first check this module is available or not.
$ pip list or conda list
If it is not available, then install this module.
$ pip install opencv-python or conda install opencv-python
But before that, try to check numpy module is available or not. If numpy is not available, then install this first.
$ pip install numpy
Hope this will solve your error.