Gstreamer Error

Hi. When i run “cv2.getbuildinformation()” in python, gstreamer shows “yes”. But when i run this commandat the below in pycharm,it gives No Module CV2 error

gst_pipeline = (
    "udpsrc port=5000 caps=application/x-rtp,media=video,encoding-name=H264,payload=96 ! "
    "rtph264depay ! avdec_h264 ! videoconvert ! appsink"
)


cap = cv2.VideoCapture(gst_pipeline, cv2.CAP_GSTREAMER)

if not cap.isOpened():
    print("❌Failed Toopen gstreamer stream")
    exit()

print("✅ Image is being acquired... You can exit with ESC.")

while True:
    ret, frame = cap.read()
    if not ret:
        print("⚠️ Cant take square")
        break

   
    cv2.imshow("UDP GStreamer Receiver", frame)

    
    if cv2.waitKey(1) & 0xFF == 27:
        break

cap.release()
cv2.destroyAllWindows()

I’m using Windows 11 x64bit ,Gstreamer 1.26.6,OpenCV last version, python 3.8

I waiting for your helps. Please help

what precisely is the error and error message?