Trying to download nltk packages using nltk.download() on MacOS in India.
Tried this
import nltk
import ssl
try:
_create_unverified_https_context = ssl._create_unverified_context
except AttributeError:
pass
else:
ssl._create_default_https_context = _create_unverified_https_context
nltk.download()
The code runs and opens the NLTK Downloader window but I get the error:
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)
I have also run the install Certificates.command:
/Applications/Python 3.12/Install Certificates.command ; exit;
I don’t know what to do now. Btw I am running the code on a Jupyter notebook on a virtual environment
New contributor