I'm not quite sure if this applies, but at some point they stopped supporting SIFT in later versions of opencv. I believe that it is patented or something related (source?), However, an alternative is to use ORB, which will have a similar effect.
You can try something like this:
from cv2 import ORB as SIFT
However, if you get an import error, this may also work for you:
SIFT = cv2.ORB_create
If you paste the ones next to your file, you can probably leave "SIFT" as it is throughout the file (more or less, you get the idea, basically replace cv2.Sift () with sift = SIFT () and you should be in better shape.)
source share