title: How can I use SIFT in opencv 2.4
body: <p>I want to use SIFT. I've already tried this code: </p>
  
  <pre><code>  import cv2
    import numpy as np
    img = cv2.imread('1.jpg')
    gray= cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
    sift = cv2.xfeatures2d.SIFT_create()
    kp = sift.detect(gray,None)
    img=cv2.drawKeypoints(gray,kp,img)
    cv2.imwrite('sift_keypoints.jpg',img)
  </code></pre>
  
  <p>But I get this error:</p>
  
  <p><strong><em>./sifttt.py: line 3: syntax error near unexpected token `('</em></strong></p>
  
  <p><strong><em>./sifttt.py: line 3: `img = cv2.imread('1.jpg')'</em></strong></p>
  
  <p>I don't know if I need to install something or if I need to do something else? </p>