close

[Solved] NLTK download SSL: Certificate verify failed

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error NLTK download SSL: Certificate verify failed in python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How NLTK download SSL: Certificate verify failed Error Occurs?

Today I get the following error NLTK download SSL: Certificate verify failed in python.

How To Solve NLTK download SSL: Certificate verify failed Error ?

  1. How To Solve NLTK download SSL: Certificate verify failed Error ?

    To Solve NLTK download SSL: Certificate verify failed Error The downloader script is broken. As a temporal workaround can manually download the punkt tokenizer from here and then place the unzipped folder in the corresponding location.

  2. NLTK download SSL: Certificate verify failed

    To Solve NLTK download SSL: Certificate verify failed Error The downloader script is broken. As a temporal workaround can manually download the punkt tokenizer from here and then place the unzipped folder in the corresponding location.

Solution 1

The downloader script is broken. As a temporal workaround can manually download the punkt tokenizer from here and then place the unzipped folder in the corresponding location. The default folders for each OS are:

  • Windows: C:\nltk_data\tokenizers
  • OSX: /usr/local/share/nltk_data/tokenizers
  • Unix: /usr/share/nltk_data/tokenizers

Solution 2

This works by disabling SSL check!

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

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read