module 'cv2.cv2' has no attribute 'xfeatures2d' code example
Example 1: module 'cv2.cv2' has no attribute 'imWrite'
pip install opencv-contrib-python
Example 2: Module 'cv2' has no 'imread' memberpylint(no-member)
from cv2 import cv2
Example 3: module 'cv2.cv2' has no attribute 'videowriter'
#for opencv3 do this
cv2.VideoWriter_fourcc(*'MJPG')