我正在尝试运行一些python代码,使用的是textblob。这是以下代码:
#!/Library/Frameworks/Python.framework/Versions/3.6/bin/python3
from textblob import TextBlob
from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer
analysis = TextBlob("TextBlob sure looks like it has some interesting
features")
print(analysis.tags)
在运行它时,它告诉我我错过了这个,所以我运行了它...
Looks like you are missing some required data for this feature.
To download the necessary data, simply run
python -m textblob.download_corpora
or use the NLTK downloader to download the missing data:
http://nltk.org/data.html
If this doesn't fix the problem, file an issue at
https://github.com/sloria/TextBlob/issues.
所以当我运行的时候,它给了我这个失败的尝试。我想不出怎么改正这个错误。
$ python -m textblob.download_corpora
[nltk_data] Error loading brown: <urlopen error [SSL:
[nltk_data] CERTIFICATE_VERIFY_FAILED] certificate verify failed
[nltk_data] (_ssl.c:833)>
[nltk_data] Error loading punkt: <urlopen error [SSL:
[nltk_data] CERTIFICATE_VERIFY_FAILED] certificate verify failed
[nltk_data] (_ssl.c:833)>
[nltk_data] Error loading wordnet: <urlopen error [SSL:
[nltk_data] CERTIFICATE_VERIFY_FAILED] certificate verify failed
[nltk_data] (_ssl.c:833)>
[nltk_data] Error loading averaged_perceptron_tagger: <urlopen error
[nltk_data] [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify
[nltk_data] failed (_ssl.c:833)>
[nltk_data] Error loading conll2000: <urlopen error [SSL:
[nltk_data] CERTIFICATE_VERIFY_FAILED] certificate verify failed
[nltk_data] (_ssl.c:833)>
[nltk_data] Error loading movie_reviews: <urlopen error [SSL:
[nltk_data] CERTIFICATE_VERIFY_FAILED] certificate verify failed
[nltk_data] (_ssl.c:833)>
Finished.
对此有什么想法吗?
发布于 2018-06-29 05:11:50
答案可以在这里找到:Here
转到applications/python3.6/并双击安装证书文件。
然后你就可以跑了。
python -m textblob.download_corpora
而且它起作用了!
https://stackoverflow.com/questions/51077926
复制相似问题