Import error with spacy: "No module named en"

For windows, open cmd with admin right. Then,

python -m spacy download en 

You should see the shell prompt stating.

You can now load the model via spacy.load('en')


You are facing this error because you named your own file spacy.py. Rename your file, and everything should work.


I had the same issue, and the problem was the folder where the module 'en' was stored (spacy/lang/en).

Typing:

from spacy.lang.en import English

fixed the issue.

This post was helpful in figuring this out.


It is possible that the version of Python at /usr/bin/python is not the one that has spacy installed. If so, navigating to the directory where your 'normal' version of Python is before running

python -m spacy.en.download

should fix the problem. (For example, I installed spacy using Anaconda and had to navigate to C:\Anaconda2\ first.)

Tags:

Python

Spacy