无法下载nltk数据 [英] Unable to download nltk data

查看:120
本文介绍了无法下载nltk数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

import nltk
nltk.download()

它显示[SSL:CERTIFICATE_VERIFY_FAILED].如果使用requests,则可以使用verify=False,但是在这里该怎么做.

It shows [SSL:CERTIFICATE_VERIFY_FAILED]. In case of requests one can use verify=False, but what to do here.

更新:

此错误在Mac OS X 10.7.5的Python 3.6和NLTK 3.0上仍然存在:

This error persists on Python 3.6, with NLTK 3.0, on Mac OS X 10.7.5:

在NLTK下载器中更改索引(建议在此处)允许下载程序显示所有NLTK的文件,但是当一个人尝试下载所有文件时,会出现另一个SSL错误(请参见照片底部):

Changing the index in the NLTK downloader (suggested here) allows the downloader to show all of NLTK's files, but when one tries to download all, one gets another SSL error (see bottom of photo):

推荐答案

在尝试同时配置nltk和SpaCy时,我遇到了同样的问题.根据中的说明进行操作这个问题,我能够解决这个问题.尝试运行/Applications/Python\ 3.6/Install\ Certificates.command,然后重试NLTK下载

I had the same problem when trying to configure both nltk and SpaCy. Per the instructions in this question, I was able to overcome the issue. Try running /Applications/Python\ 3.6/Install\ Certificates.command, then retry your NLTK download

这篇关于无法下载nltk数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆