question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[SSL: CERTIFICATE_VERIFY_FAILED] when executing python -m spacy.en.download

See original GitHub issue

Hi,

I am receiving the error pasted bellow when executing the command ‘python -m spacy.en.download’

File "/usr/local/lib/python3.5/runpy.py", line 184, in _run_module_as_main "__main__", mod_spec) File "/usr/local/lib/python3.5/runpy.py", line 85, in _run_code exec(code, run_globals) File "/root/.virtualenvs/jordipala_pfc/lib/python3.5/site-packages/spacy/en/download.py", line 13, in <module> plac.call(main) File "/root/.virtualenvs/jordipala_pfc/lib/python3.5/site-packages/plac_core.py", line 328, in call cmd, result = parser.consume(arglist) File "/root/.virtualenvs/jordipala_pfc/lib/python3.5/site-packages/plac_core.py", line 207, in consume return cmd, self.func(*(args + varargs + extraopts), **kwargs) File "/root/.virtualenvs/jordipala_pfc/lib/python3.5/site-packages/spacy/en/download.py", line 9, in main download('en', force) File "/root/.virtualenvs/jordipala_pfc/lib/python3.5/site-packages/spacy/download.py", line 24, in download package = sputnik.install(about.__title__, about.__version__, about.__models__[lang]) File "/root/.virtualenvs/jordipala_pfc/lib/python3.5/site-packages/sputnik/__init__.py", line 37, in install index.update() File "/root/.virtualenvs/jordipala_pfc/lib/python3.5/site-packages/sputnik/index.py", line 84, in update index = json.load(session.open(request, 'utf8')) File "/root/.virtualenvs/jordipala_pfc/lib/python3.5/site-packages/sputnik/session.py", line 43, in open r = self.opener.open(request) File "/usr/local/lib/python3.5/urllib/request.py", line 466, in open response = self._open(req, data) File "/usr/local/lib/python3.5/urllib/request.py", line 484, in _open '_open', req) File "/usr/local/lib/python3.5/urllib/request.py", line 444, in _call_chain result = func(*args) File "/usr/local/lib/python3.5/urllib/request.py", line 1297, in https_open context=self._context, check_hostname=self._check_hostname) File "/usr/local/lib/python3.5/urllib/request.py", line 1256, in do_open raise URLError(err) urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)> I’ve tried in three differents machines.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:5
  • Comments:32 (5 by maintainers)

github_iconTop GitHub Comments

6reactions
maksymxcommented, Jan 23, 2017

This issue can be fixed by this walkthrough (it’s for Mac): http://stackoverflow.com/questions/41691327/ssl-sslerror-ssl-certificate-verify-failed-certificate-verify-failed-ssl-c/41692664

but in general - it’s simply to update certifi package via pip

2reactions
AliFluxcommented, Feb 19, 2017

Hey!

I was just experimenting with SSL options and eureka! Found a hacky solution.

  1. Visit C:\Program Files\Python35\Lib\site-packages\sputnik or where ever the sputnik is installed.
  2. Open session.py
  3. Add import ssl to the imports
  4. Add ssl._create_default_https_context = ssl._create_unverified_context just before the r = self.opener.open(request) statement.

Now it’s going to ignore all SSL errors globally. It’s still a hack and must never be used in production cases.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SSL: CERTIFICATE_VERIFY_FAILED error while ...
For me the issue was i was running the command "python -m spacy download en" from a different location other than "C:\WINDOWS\system32".
Read more >
Installation Spacy error - Rasa Open Source
I'm not able to install spacy. pip3 install rasa[spacy] after this command I was trying to install this command(python -m spacy download ......
Read more >
English · spaCy Models Documentation
spaCy is a free open-source library for Natural Language Processing in Python. It features NER, POS tagging, dependency parsing, word vectors and more....
Read more >
spacy install and problems sovled - CodeAntenna
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749). Python 3.6 ... v1.7.x以前的旧版本: python -m spacy.en.download all ...
Read more >
PIP connection Error : SSL CERTIFICATE VERIFY FAILED
The most common issue in installing python package in a company's network is failure of verification of SSL Certificate. Sometimes company blocks some ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found