I have downloaded spacy in Anaconda prompt by using conda install -c conda-forge spacy. But when I tried to download en_core_we_sm using python -m spacy download en_core_web_sm I getting SSL: CERTIFICATE_VERIFY_FAILED error.
With HTTPS, trying to download something from a remote host produces an SSL connection error in some cases like if your computer is behind a proxy which does not let you to make SSL connection freely. For those cases, a downloading manager like pip , conda for python or apt-get or yum for Linux provide some options for a user to specify certificate for such connections or to allow untrusted communication with a remote host for such downloads.
However, downloading a model VIA spacy with python -m spacy download
does not provide such options. You cannot add any SSL certificates nor specify trusted host for a download.
Fortunately, there's a workaround solution with two separate steps , downloading and installing. That is, download the model with any other clients which is under control with SSL (browser, curl, wget...) then install the downloaded model with pip install
Find appropriate model you need on https://github.com/explosion/spacy-models/releases and download tar.gz file like,
wget https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.2.5/en_core_web_sm-2.2.5.tar.gz
Then install it like,
python -m pip install ./en_core_web_sm-2.2.5.tar.gz
Just download the direct version.
python -m spacy download en_core_web_sm-2.2.0 --direct
I had the same error as you, gave this a try, and it worked. For more information here are some additional details from the model page: https://spacy.io/usage/models
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With