I am creating a face recognition system using Python and OpenCV on these versions:
I also had same problem but it got resolved by following these steps:
start anaconda navigator
open CMD.exe prompt, hope you see this **(base) C:\Users\acer>**
this may be different for you
write these command >>>**pip install opencv-contrib-python**
Now you can run your code as check!! I have runned my code in Spyder in base enviroment and it worked for me!