Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to install spacy english model in python 3.5

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.

like image 592
HBK Avatar asked Jun 14 '18 09:06

HBK


People also ask

Why spaCy load is not working?

This error means that the spaCy module can't be located on your system, or in your environment. Make sure you have spaCy installed. If you're using a virtual environment, make sure it's activated and check that spaCy is installed in that environment – otherwise, you're trying to load a system installation.

How do I manually download a spaCy model?

To download and install the models manually, unpack the archive, drop the contained directory into spacy/data and load the model via spacy. load('en') or spacy. load('de') .

How do I install a spaCy model in Pycharm?

Click the Python Interpreter tab within your project tab. Click the small + symbol to add a new library to the project. Now type in the library to be installed, in your example "spacy" without quotes, and click Install Package . Wait for the installation to terminate and close all popup windows.


1 Answers

en_core_web_md doesn't exist as a package in its own right on pypi.org or Anaconda, so you can't just pip install it by name. However you can find download links for the model on the GitHub page and you can pip install directly from one of the download URLs, e.g.

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

Note that when I tested that it did install spacy for me. So it might be easiest to just use spacy to download in the first place and change the linked model with python -m spacy link afterwards if necessary.

like image 100
Rup Avatar answered Sep 30 '22 21:09

Rup