title: How can I use urllib.request.urlretrieve with python 2.7
body: <p>I am trying to get images dowloaded from image-net.org so that I can create a haar cascade classifier. I am following this tutorial <a href="https://www.youtube.com/watch?v=z_6fPS5tDNU&amp;list=PLQVvvaa0QuDdttJXlLtAJxJetJcqmqlQq&amp;index=18" rel="noreferrer">https://www.youtube.com/watch?v=z_6fPS5tDNU&amp;list=PLQVvvaa0QuDdttJXlLtAJxJetJcqmqlQq&amp;index=18</a> but I am using python 2.7 instead of python 3. So in the tutorial he has the line:</p>
  
  <pre><code>urllib.request.urlretrieve(img, pathToImage)
  </code></pre>
  
  <p>Instead of <code>import urllib.request</code> I did this <code>import urllib2</code> So I tried this but it isn't vaild</p>
  
  <pre><code>urllib2.urlretrieve(i, "Negatives/"+str(num)+".jpg")
  </code></pre>
  
  <p>Thank you in Advance!</p>