简体   繁体   English

安装 spaCy - SSL 证书错误

[英]Installing spaCy - SSL Certificate Error

I have installed spaCy using pip install spacy but when trying python -m spacy.en.download all , I get the following error ..我已经使用pip install spacy安装了 spaCy,但是在尝试python -m spacy.en.download all ,我收到以下错误..

在此处输入图片说明

(For Google -- ssl.CertificateError: hostname 'index.spacy.io doesn't match 'api.explosion.ai'`) (对于谷歌 - ssl.CertificateError: hostname 'index.spacy.io不匹配 'api.explosion.ai'`)

Is there a way to fix this easily?有没有办法轻松解决这个问题? Ref ..参考..

Try installing the new version in Linux.尝试在 Linux 中安装新版本。 It will work.它会起作用。

Are you behind a proxy?你在代理后面吗? I have to set ssl to false and then back again once installed.我必须将 ssl 设置为 false,然后在安装后再次返回。 config conda --set ssl_verify false in anaconda prompt might work for you? config conda --set ssl_verify false in anaconda prompt 可能对你config conda --set ssl_verify false吗?

从 VPN(虚拟专用网络)断开连接对我有用。

I found this answer, I am on MacOS and was not behind a proxy.我找到了这个答案,我在 MacOS 上并且不在代理后面。 The below command installing from source got around the error.从源代码安装的以下命令解决了错误。

pip install https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.0.0/en_core_web_sm-3.0.0.tar.gz

This error is fixed in the latest spacy version and should not occur anymore.此错误已在最新的 spacy 版本中修复,不应再发生。 If you are experiencing the issue you should如果您遇到此问题,您应该

  1. update your spacy version using pip install -U spacy使用pip install -U spacy更新您的 spacy 版本
  2. and install the new models using python -m spacy download en并使用python -m spacy download en安装新模型

Be aware that the download command changed for installing models!请注意,下载命令已更改为安装模型!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM