You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to run the en_core_web_sm module in Python IDE with:
import spacy
nlp = spacy.load("en_core_web_sm")
it shows an error message:
File "/home/disha/Desktop/project/python/parser/venv/lib/python3.6/site-packages/spacy/__init__.py", line 30, in load
return util.load_model(name, **overrides)
File "/home/disha/Desktop/project/python/parser/venv/lib/python3.6/site-packages/spacy/util.py", line 169, in load_model
raise IOError(Errors.E050.format(name=name))
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 every possible solution which was suggested on GitHub and Stack Overflow but nothing worked
Operating System: Ubuntu
Python Version Used: 3.6
spaCy Version Used: 2.2.3
Can somebody help me fix this issue? Thanks in advance!
The text was updated successfully, but these errors were encountered:
Hi, check that the python3 command you are using to install spacy and the model is the same python command as used within the IDE. I can't tell for sure, but I would guess that python3 is the system python from /usr/bin/python3 and the IDE is using python in your venv, maybe: /home/disha/Desktop/project/python/parser/venv/bin/python.
Also, the error message makes it look like you were trying to run spacy.load('en') instead of spacy.load('en_core_web_sm'). If you run spacy download en_core_web_sm, the shortcut en isn't created, so you need to use spacy.load('en_core_web_sm').
You can add the shortcut with spacy link en_core_web_sm en or have it created along with the download with spacy download en, but honestly it's a good idea to use the full name to avoid confusion.
I have installed spacy and downloaded en_core_web_sm with:
When I try to run the en_core_web_sm module in Python IDE with:
it shows an error message:
I have tried every possible solution which was suggested on GitHub and Stack Overflow but nothing worked
Can somebody help me fix this issue? Thanks in advance!
The text was updated successfully, but these errors were encountered: