I am trying to familiarize myself with the urllib module in Python 3. The code below is not working on my computer but works when I test it on repl.it for some reason.
Please let me know what I am doing wrong, I am running python 3.6.5 if that helps.
import urllib.request
req = urllib.request.urlopen('http://www.pythonprogramming.net')
print (req.read())
The error I get is
urllib.error.URLError: urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:833)
I am using a Mac