Python – Spacy – Model not found

Spacy – Model not found… here is a solution to the problem.

Spacy – Model not found

Run:

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

Causes the following error:

E050] Can’t find model ‘en_core_web_sm’. It doesn’t seem to be a shortcut link, a Python package or a valid path to a data directory.

How do I fix this?

Solution

Assuming you have spaCy installed correctly on your machine, open cmd and enter:

python -m spacy download en_core_web_sm

Then run your script again and you should be fine

Related Problems and Solutions