OSError: Can’t find model ‘en’ error typically occurs in Python when the “English language model you’re trying to use with spaCy hasn’t been installed in your machine.” When you install spaCy, the core library is installed, but language models must be downloaded separately.
How to fix the error
Here are some steps to fix this issue:
Step 1: Make Sure spaCy is Installed
Ensure you have spacy installed. You can install it via pip if you haven’t:
pip install spacy
Step 2: Download the English Language Model
You can download the English language model using the following command:
python -m spacy download en_core_web_sm
This will download the small English model (en_core_web_sm). There are medium (en_core_web_md) and large (en_core_web_lg) models, which you can download depending on your requirements.
Step 3: Import and Load the Model in Your Code
Once downloaded, you can load this model in your Python script as follows:
import spacy
nlp = spacy.load("en_core_web_sm")
Now, you can use the nlp object for various natural language processing tasks.
That’s it!
Related posts
ImportError: No module named ‘spacy.en’
OSError: [E050] Can’t find model ‘en_core_web_sm’

Krunal Lathiya is a seasoned Computer Science expert with over eight years in the tech industry. He boasts deep knowledge in Data Science and Machine Learning. Versed in Python, JavaScript, PHP, R, and Golang. Skilled in frameworks like Angular and React and platforms such as Node.js. His expertise spans both front-end and back-end development. His proficiency in the Python language stands as a testament to his versatility and commitment to the craft.