Error reporting location:
sift = cv2.SIFT_create()
Reason for the error: opencv has integrated SIFT and other algorithms into the xfeatures2d collection.
Change to:
sift = cv2.xfeatures2d.SIFT_create()
sift = cv2.SIFT_create()
Reason for the error: opencv has integrated SIFT and other algorithms into the xfeatures2d collection.
Change to:
sift = cv2.xfeatures2d.SIFT_create()