我正在尝试使用textblob运行一些python代码。 这是下面的代码:
#!/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.
关于原因的任何想法?
答案 0 :(得分:2)
在这里找到答案:Here
转到Applications / python 3.6 /并双击安装证书文件。
然后您可以运行...
python -m textblob.download_corpora
它有效!