NLTK下载语言素材中碰到的certificate verify failed (_ssl.c:749)
NLTK是什么?
NLTK是一个开源的项目,包含:Python模块,数据集和教程,用于NLP的研究和开发。
NLTK由Steven Bird和Edward Loper在宾夕法尼亚大学计算机和信息科学系开发。
NLTK包括图形演示和示例数据。其提供的教程解释了工具包支持的语言处理任务背后的基本概念。
各类的版本信息
NLTK 3.2.4 MacOS:10.12.5 Python 3.6.1
下载NLTK语料库碰到的问题
pip3 install nltk
安装NLTK的包
ipython
切换到ipython的环境
import nltk
nltk.download()
这个命令是用来下载nltk自带的语料库内容的。
结果碰到了如下问题:
然后NLTK会弹出一个对话框下载框:
大家可以看到这里有一个错误信息:
SSL: CERTIFICATE_VERIFY_FAILED certificate verify failed(_ssl.c:749)
根据这里的信息判断,应该是在下载过程中调用openssl的内容之时发生的错误, 该如何来解决呢?
问题的解决
碰到问题,解决问题,然后搜索了一下,找到了解决方案:
cd /Applications/Python 3.6
./Install Certificates.command
重新下载nltk语料库
import nltk
nltk.download()
下载nltk的语料库:
总结
本质上其为下载中openssl的证书问题造成的。
NLTK下载语言素材中碰到的certificate verify failed (_ssl.c:749)的更多相关文章
- [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)
再用爬虫爬取数据的时候报错:[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661) 好多博客我看都说是:网站证书 ...
- 豆瓣 URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:719)>
import urllib.request as urlrequest #import ssl#ssl._create_default_https_context = ssl._create_unve ...
- ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:847)
/******************************************************************************* * ssl.SSLError: [SS ...
- 【Python】【BugList13】req = requests.get(url=target)报错: (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)')
[代码] # -*- coding:UTF-8 -*- import requests if __name__ == '__main__': target = 'https://unsplash.co ...
- [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)
Could not fetch URL https://pypi.python.org/simple/six/: There was a problem confirming the ssl cert ...
- 解决pyhton aiohttp ssl:None [[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)
解决pyhton aiohttp ssl:证书报错问题, 错误信息> Cannot connect to host oapi.dingtalk.com:443 ssl:None [[SSL: C ...
- keras 下载预训练模型报错SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)
import ssl ssl._create_default_https_context = ssl._create_unverified_context https://stackoverflow. ...
- Let'sencrypt.sh 抛出异常: Response: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)>
起因 今天网站的SSL证书过期了,打算重新申请,运行 Let'sencrypt.sh 的时候抛出了这么个异常. 一番搜索,发现居然找不到直接的答案.没有直接的答案就只能通过间接的答案来解决了. 希望我 ...
- facebook graph api 报错SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)')
使用facebook graph api,报错如下 一开始以为是https证书验证失败,查了一下午源码,没有看到问题,于是把Python27\lib\site-packages\requests\ad ...
随机推荐
- Excel的单元格设置下拉选项并填充颜色
如何在Excel的单元格中加入下拉选项 方法/步骤 第一步:打开excel文档,选中需加入下拉选项的单元格. 第二步:点击菜单中的“数据”->“数据有效性”->“数据 ...
- Java最新趋势之Spring阅读
(原文地址:点我) This Week in Spring: Cloud Native and the State of Java This compilation of news and tutor ...
- Javascript中call()和apply()的用法 ----1
1.方法定义 call方法: 语法:call([thisObj[,arg1[, arg2[, [,.argN]]]]]) 定义:调用一个对象的一个方法,以另一个对象替换当前对象. 说明: call ...
- C# 字符串中正则表达式的应用
1.截取字符串中指定内容 {"weatherinfo":{"city":"北京","cityid":"1010 ...
- 【leetcode刷题笔记】Find Peak Element
A peak element is an element that is greater than its neighbors. Given an input array where num[i] ≠ ...
- Madplay移植到mini2440开发板【转】
本文转载自:https://blog.csdn.net/simanstar/article/details/24035379 madplay交叉编译 交叉编译器:arm-linux-gcc 3.4.1 ...
- 【转载】User notification 的实现方法
原帖请看:http://cocoathings.blogspot.com/2013/01/introduction-to-user-notifications-in.html 想要实现如图这样的not ...
- Effective C++ 条款12:复制对象时勿忘其每一个成分
void logCall(const std::string& funcName); class Customer { public: ... Customer (const Customer ...
- 正则表达式【TLCL】
grep[global regular expression print] print lines matching a pattern grep [options] regex [file...] ...
- mysql入门语句
连接 1.mysql -h localhost -u root -p ******(回车) 2.mysql -h localhost -u root -p(回车) ****** 3.mysql -u ...