Spacy Model installation issue
Trying to install and link model en_default.
python -m spacy download en_core_web_sm python -m spacy link en_core_web_sm en_default
Outpunt:C:\rasa_nlu-master>python -m spacy link en_core_web_sm en_default
Traceback (most recent call last):
File "C:\Python27\lib\runpy.py", line 174, in _run_module_as_main
"main", fname, loader, pkg_name)
File "C:\Python27\lib\runpy.py", line 72, in run_code
exec code in run_globals
File "C:\Python27\lib\site-packages\spacy_main.py", line 138, in
Your Environment
- Python version: 2.7.13
- Platform: Windows-2012ServerR2-6.3.9600
- spaCy version: 1.7.5
- Installed models:
Thanks for the report!
Damn, I thought the updates to the Windows symlink workaround would have finally fixed the symlinking/path issues here. We'll look into this.
In the meantime, you can always create the symlinks manually (in spacy/data), or simply import the models as modules:
import en_core_web_sm
nlp = en_core_web_sm.load()
So, in above .pys, in which .py i should add above two lines? I am new to this.. sorry.
Thanks for your help.
i have created file symlinks.py under /python27/Lib/Site-packages/spacy/data
and added below lines.
import en_core_web_sm nlp = en_core_web_sm.load()
Then I again try to run the link command but got the same error.

this helped me
Thanks for updating – glad you got it to work by manually creating the symlink!
About the code snippet: You can use this method of loading the models instead of spacy.load('en') etc. in your own code. For example, your script could look something like this:
import spacy
import en_core_web_sm
nlp = en_core_web_sm.load()
doc = nlp(u'This is a sentence')
for word in doc:
print(word.text, word.lemma_)
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.