'OSError: [E050] Can't find model 'en_core_web_lg'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory
I'm trying to extract locations from text using Spacy in Google Colab:
import spacy
nlp = spacy.load('en_core_web_lg')
Returns:
OSError: [E050] Can't find model 'en_core_web_lg'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory.
Solution 1:[1]
You need to download the model before you use it. Please refer to the quickstart.
spacy download en_core_web_lg
Solution 2:[2]
**For Google Collab: **
import spacy.cli
spacy.cli.download("en_core_web_lg")
You will get a message saying--
? Download and installation successful
You can now load the package via spacy.load('en_core_web_lg')
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | polm23 |
| Solution 2 |
