NLTK - Download ssl verification error

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()

try语句里面会禁止 SSL 检查

你可能感兴趣的:(NLTK - Download ssl verification error)