I'm on macOS Monterey 12.5.1, and I try to execute this code in python with IDLE, to capture my camera video:
import cv2
cap=cv2.VideoCapture(0)
And that returns an error:
OpenCV: not authorized to capture video (status 0), requesting...
Process ended with exit code -9.
I go in System preferences -> Security and privacy -> privacy -> camera I want to enable the camera access for IDLE but the IDLE app doesn't appears in the list of applications, and I can't add any apps.
I don't know how to enable the camera permission for IDLE or how to resolve the problem.
Please help me by telling what to do to resolve this problem ! Thanks.