Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download of 1.6 en model fails with ssl exception #920

Closed
tmbo opened this issue Mar 24, 2017 · 10 comments
Closed

Download of 1.6 en model fails with ssl exception #920

tmbo opened this issue Mar 24, 2017 · 10 comments
Labels
models Issues related to the statistical models

Comments

@tmbo
Copy link

tmbo commented Mar 24, 2017

When trying to download the en model with spacy 1.6(using python -m spacy.en.download all) the download fails with:

urllib2.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)>
@ines
Copy link
Member

ines commented Mar 25, 2017

Damn, looks like the SSL certificate might have expired!

In the meantime, you can always download the models manually from the v1.6 release on GitHub (just drop the data directory into spacy/data). Our download server will soon be rerouted to download these files as well.

@ines ines added the models Issues related to the statistical models label Mar 25, 2017
@honnibal
Copy link
Member

Fixed the certificate -- sorry for the delay.

@ines ines closed this as completed Mar 25, 2017
@sankethpb
Copy link

We still get this error and are unable to install models using python -m spacy.en.download all
Spacy version - 1.7.2
Could you please help here?

@ines
Copy link
Member

ines commented Apr 10, 2017

@sankethpb The spacy.en.download all command is deprecated in v1.7+. You can now download the default English model with python -m spacy download en.

For more info on the available models and new download commands, see the models documentation.

@sankethpb
Copy link

sankethpb commented Apr 13, 2017

I used the new command python -m spacy download en with Spacy V1.7.2
I still get [SSL: CERTIFICATE_VERIFY_FAILED] error on both Windows 10 and Ubuntu 16.04 LTS

@ines
Copy link
Member

ines commented Apr 13, 2017

@sankethpb Hm, this is very strange – the downloader gets the model URLs from our models repo on GitHub (via SSL, but GitHub's certificate should be fine), and then uses pip to install them.

Do you get the same error if you run this manually?

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

If it still doesn't work, you can always just download the model archive manually via the browser and then point pip to the archive on your local file system. To load the model, you'll have to set up a shortcut link manually, or simply import the model as a module and call its load() method:

import en_core_web_sm
nlp = en_core_web_sm.load()

@sankethpb
Copy link

sankethpb commented Apr 13, 2017

@ines I also tried to using pip install pip install https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-1.2.0/en_core_web_sm-1.2.0.tar.gz and still get the same SSL Verification failed error.

The short links didn't work for me (or maybe I did it wrong) since I use Spacy with RASA Nlu, finally I modified pip's download.py to ignore SSL verification and now it installed successfully. It's a bad workaround though.

It would be great if it can be fixed.
Thanks in advance.

@honnibal
Copy link
Member

Well, the service is GitHub, and the software that's installing it is pip --- so I think it's almost certain that the problem is in your system.

I think some Python versions were linked against an old version of OpenSSL, which didn't implement some SSL protocol correctly. I don't remember the details entirely. But I think if you update your Python and possibly your OpenSSL, it'll work correctly.

@AdeMiller
Copy link

AdeMiller commented Dec 18, 2017

I'm still seeing this issue. The following workaround fixed it from me

pip install  http://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.0.0/en_core_web_sm-2.0.0.tar.gz \
  --trusted-host github-production-release-asset-2e65be.s3.amazonaws.com -v

You may have to change the trusted host depending on what and were you are downloading. The -v option will show the exact URL and hostname that requires a trust.

@lock
Copy link

lock bot commented May 8, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators May 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
models Issues related to the statistical models
Projects
None yet
Development

No branches or pull requests

5 participants