3

Running:

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

Results in 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 solve this issue?

Employee
  • 3,109
  • 5
  • 31
  • 50
Gulab Sah
  • 41
  • 1
  • 2

3 Answers3

3

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

python -m spacy download en_core_web_sm

Then run again your script and you should be fine

Employee
  • 3,109
  • 5
  • 31
  • 50
  • Faced similar issue in Google Colab. Could you please have a look into the issue below. https://stackoverflow.com/questions/56927602/unable-to-load-the-spacy-model-en-core-web-lg-on-google-colab – Jithin P James Jul 08 '19 at 12:23
0

Error E050

In order to load model/pipeline first we need to install the model. Please type in below download command in terminal.

python -m spacy download en_core_web_sm

Yt Video - Fix E050 | Can't find model en_core_web_sm

0

First of all try to install the model:

python -m spacy download en_core_web_sm

After that, if the installation is successful, you must be able to load the model (using the code you provided).

If the issue persists, (maybe you can try?) specifying the full path to the model when loading it:

nlp = spacy.load('/path/to/en_core_web_sm')