Closed yutingwum closed 5 years ago
Are you behind a proxy? The problem here is likely this one and happens in requests
when spaCy is trying to fetch the shortcuts and compatibility table from GitHub over SSL. https://stackoverflow.com/questions/46604114/python-requests-ssl-error-certificate-verify-failed
I think the easiest workaround is to just download the .tar.gz
manually via your browser and then pip install
that file. See the model releases and the models directory (each model has a "release details" button).
Now that the download
command is back to using requests
, we could consider adding a --cert
option that's passed to both requests
(to download shortcuts and compatibility JSON files) and pip
in the subprocess (to actually download and install the model). I'm just not sure how to best test this.
@ines Hi Ines, thank you for your reply. I am using a corporate laptop so I guess it is behind proxy. For downloading the package to a directory, if I am using a virtual environment, what directory should I download to? Currently the Spacy folder itself is in venv/lib/spacy
@yutingwum spaCy models are regular Python packages and the .tar.gz
archive you download is the installer. So you can download the file to any directory. In your virtual environment, you can then pip install
the model from the local path:
pip install /local/path/to/en_core_web_sm-2.1.0.tar.gz
This will automatically install the model in your Python environment, like any other package. You'll them be able to load it via spacy.load("en_core_web_sm")
.
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.
Situation
I tired to download Spacy models on virtual environment with Python 3.6.5. After successfully download Spacy with the line
pip install rasa[spacy]
, I tried to download the English model withpython -m spacy download en_core_web_md
. But an SSLErrorr was raised. I looked into other similar issues including #3066, #2248, #2212I tried the following line
python3 -m spacy download en_core_web_md-2.1.8 --direct
but did not work and threw the same error as well.Please see the below output.
Your Environment