Steps performed
pip install spacy
python -m spacy download en
Linking successful
/home/anil/anaconda3/lib/python3.6/site-packages/en_core_web_sm -->
/home/anil/anaconda3/lib/python3.6/site-packages/spacy/data/en
You can now load the model via spacy.load('en')
Error executing code from fastai.nlp import *
When
OSError Traceback (most recent call last)
in ()
11 from fastai.rnn_reg import *
12 from fastai.rnn_train import *
—> 13 from fastai.nlp import *
14 from fastai.lm_rnn import *
15
/mnt/data/ssd000/dsb2017/anil/fastai/courses/dl1/fastai/nlp.py in ()
5 from .dataset import *
6 from .learner import *
----> 7 from .text import *
8 from .lm_rnn import *
9
~/anaconda3/envs/fastai/lib/python3.6/site-packages/spacy/init.py in load(name, **overrides)
17 “to load. For example:\nnlp = spacy.load(’{}’)”.format(depr_path),
18 ‘error’)
—> 19 return util.load_model(name, **overrides)
20
21
~/anaconda3/envs/fastai/lib/python3.6/site-packages/spacy/util.py in load_model(name, **overrides)
117 elif hasattr(name, ‘exists’): # Path or Path-like to model data
118 return load_model_from_path(name, **overrides)
–> 119 raise IOError(“Can’t find model ‘%s’” % name)
120
121
~/anaconda3/envs/fastai/lib/python3.6/site-packages/spacy/init.py in load(name, **overrides)
17 “to load. For example:\nnlp = spacy.load(’{}’)”.format(depr_path),
18 ‘error’)
—> 19 return util.load_model(name, **overrides)
20
21
~/anaconda3/envs/fastai/lib/python3.6/site-packages/spacy/util.py in load_model(name, **overrides)
117 elif hasattr(name, ‘exists’): # Path or Path-like to model data
118 return load_model_from_path(name, **overrides)
–> 119 raise IOError(“Can’t find model ‘%s’” % name)
120
121
This worked for me. I don’t know why but the source command only worked from the command line and not from the notebook using ![quote=“pandeyaah, post:5, topic:11252, full:true”]
Abhishek
Following step resolved the issue
source activate fastai
then install
pip install spacy
python -m spacy download en
[/quote]