Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spacy link error

Tags:

When running:

import spacy nlp = spacy.load('en') 

the following is printed:

Warning: no model found for 'en' Only loading the 'en' tokenizer.

/site-packages/spacy/data is empty with the exception of the init file. all filepaths are only pointing to my single installation of python.

Any help appreciated on resolving this.

Thanks! Will

like image 685
negfrequency Avatar asked Apr 17 '17 20:04

negfrequency


People also ask

How do you link spaCy?

As name implies, this command will create a shortcut link for models. The models can either be a Python package or a local directory. The shortcut link enables the users to let them load models from any location using a custom name via spacy.

What does spaCy load (' en ') do?

Essentially, spacy. load() is a convenience wrapper that reads the pipeline's config. cfg , uses the language and pipeline information to construct a Language object, loads in the model data and weights, and returns it.


2 Answers

I had this same issue when I tried this on Windows 10 - the problem was the output of python -m spacy.en.download all said Linking successful but above that was the message that the symbolic link wasn't actually created, due to permissions.

Running python -m spacy.en.download all as an Adminstrator fixed the problem.

like image 152
Nick Avatar answered Sep 28 '22 07:09

Nick


You might need to install the specific module too after installing spacy. Try:

python -m spacy.en.download all

Here is the reference link: https://pypi.python.org/pypi/spacy

like image 34
sakshi Avatar answered Sep 28 '22 06:09

sakshi