OK, it's a bit of a hack, but here's what I had to do to be able to use the various NLTK data files in Python 3.x on my Mac laptop (running macOS 10.12.2).
Firstly, note that the certificate error only occurs when I try to download NLTK data using Python 3.x on my Mac (my Ubuntu VM inside of VirtualBox had no such error when using Python 3.x - which is annoying). Just why this causes an error on my Mac is beyond me, especially as the NLTK module installs into Python 3.x using pip
with no issues. It's the connection to NLTK's download server which appears to cause the SSL verification issue.
My 'ah ha!' moment came when I realised that NLTK - when installed into Python 3.x or Python 2.x - shares the same directory structure among all the versions of Python installed on any computer. So, I used the Python 2.x which comes pre-installed on macOS to install NLTK, then used nltk.download()
within Python 2.x to install the stopwords corpus with no issues. Having done this (in Python 2.x), I then went back into Python 3.x, and this code worked:
import nltk
from nltk.corpus import stopwords
print(stopwords.words('english'))
As I said, it's a bit of a hack, but this technique lets me get the NLTK data installed using Python 2.x, which I can them process with Python 3.x as required.