NLTK download SSL: Certificate verify failed

后端 未结 12 2039
面向向阳花
面向向阳花 2020-12-08 00:38

I get the following error when trying to install Punkt for nltk:

nltk.download(\'punkt\')    
 [nltk_data] Error loading Punkt: 

        
12条回答
  •  萌比男神i
    2020-12-08 00:55

    There is a very simple way to fix all of this as written in the formal bug report for anyone else coming across this problem recently (e.g. 2019) and using MacOS. From the bug report at https://bugs.python.org/issue28150:

    ...there is a simple double-clickable or command-line-runnable script ("/Applications/Python 3.6/Install Certificates.command") that does two things: 1. uses pip to install certifi and 2. creates a symlink in the OpenSSL directory to certifi's installed bundle location.

    Simply running the "Install Certificates.command" script worked for me on MacOS (10.15 beta as of this writing) and I was off and running.

提交回复
热议问题