Why am I getting cv2 error in raspbianOS and not raspberrypi shell
Please try to run your code after executing the below command.
python -m pip install opencv-contrib-python
I recently installed and compiled openCV on my raspberrypi.
Now if I use the command import cv2 in my raspian OS (either in the python shell or the IDE) I get an error 

no module named cv2 found but the same command works in the raspberrypi shell.    

How do I resolve this??

File  "home/pi/Desktop/FR.py",line 2,in module
import cv2
File "/usr/lib/python3/dist-packages/thonny/backend.py",line
305,in_custom_import
module=self_original_import(*args,**kw) ImportError:no module named
'cv2'