0

So I'm trying to get space to work but it's giving me this error:

OSError: [E050] Can't find model 'en'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory.

I have tried installing the module through the console, like 'python -m spacy download en' and a lot of other variations I found online to no success. I also tried to change spacy.load('en') to spacy.load('en_core_web_sm').

3 Answers3

0

You may need to attempt installation in both the correct path and as an admin as stated in this post:

Spacy link error

Steven Barnard
  • 514
  • 7
  • 12
0

You have to run python -m spacy download en_core_web_sm before you can use nlp = spacy.load("en_core_web_sm").

en is a special case - it's a symbolic link. If you ran python -m spacy download en, what was the output? Was the symbol link created correctly?

More info here: https://spacy.io/usage/models

Sofie VL
  • 2,931
  • 2
  • 12
  • 22
  • I already tried to download that too, like I said I tried a lot of different combinations. The output said something along 'Link created successfully' and it said 'you can now use spacy.load('en')' as well as saying 'you can now use spacy.load('en_core_web_sm'). ' before that. I checked my anaconda folder and it's there. Apparently I can even load it in the python shell with spacy.load('en'). So maybe the issue is PyCharm. But I have no idea how to deal with it right now – Expected2BlankLines Aug 03 '19 at 12:50
0

After you download the 'en' or 'en_core_web_sm' or any model,

You may validate your spaCy's version and installed model using this command:

python -m spacy validate

Then if you want to change the shortcut link to the model, you can use this command:

python -m spacy link [package name or path] [shortcut] [--force]

So for example in your case:

python -m spacy link en en_default

Or for 'en_core_web_sm':

python -m spacy link en_core_web_sm en_default

Then to load, just use:

spacy.load("en_default")

Check out spaCy's shortcut link