Created
December 19, 2019 11:42
-
-
Save tpgmartin/b6e8afe0af8e475162f8dd69f176c0e3 to your computer and use it in GitHub Desktop.
Disable SSL to install nltk dependencies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import nltk | |
import ssl | |
def download_dependencies(package_name=None): | |
try: | |
_create_unverified_https_context = ssl._create_unverified_context | |
except AttributeError: | |
pass | |
else: | |
ssl._create_default_https_context = _create_unverified_https_context | |
nltk.download(package_name) if package_name else nltk.download() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment