What folder is python installed in? If the folder is named \python2x then you have python 2.x installed, if the folder is named python3x then you have python 3 installed.
urllib.request is only available in 3, prior to that the library was simply urllib.
See here: https://docs.python.org/2/library/urllib.html
Note: The urllib
module has been split into parts and renamed in Python 3 to urllib.request, urllib.parse, and urllib.error. The 2to3
tool will automatically adapt imports when converting your sources to Python 3. Also note that the urllib.request.urlopen() function in Python 3 is equivalent to urllib2.urlopen()
and that urllib.urlopen()
has been removed.