Unable to install spacy english model in python 3.5

HBK picture HBK · Jun 14, 2018 · Viewed 17.7k times · Source

I am doing the following:

root@ABZ-173:/home/abz# pip3 install en_core_web_md
Collecting en_core_web_md
  Could not find a version that satisfies the requirement en_core_web_md (from versions: )
No matching distribution found for en_core_web_md
You are using pip version 8.1.1, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

This used to work previously. I do not want to link spacy to the model, python -m spacy download en. Instead, I want to download it independently. Also tried by various other means (by specifying version en_core_web_md==2.0.0, etc.). Unable to download.

Answer

Caleb Keller picture Caleb Keller · Jun 14, 2018

I believe the space documentation covers all of the use cases you are after. Specifically looks like there are ~3 ways to download models.

  • python -m spacy download en but that creates a link
  • python -m spacy download en_core_web_sm-2.0.0 --direct this doesn't create a link
  • pip install https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.0.0/en_core_web_sm-2.0.0.tar.gz

You can include them in requirements with the following syntax

spacy>=2.0.0,<3.0.0
https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.0.0/en_core_web_sm-2.0.0.tar.gz#en_core_web_sm

All of this was taken from the docs page here.