Forums

spacy language module installation problem

Hi All

I've installed spacy libraries and added the English nlp model without any problems but now when I try to also download the Spanish model i'm getting the following problem :

1) running python -m spacy download es_core_news_sm --user command installs it but to python2.7 I believe when trying to load I get this error :

2019-12-19 22:48:24,827: File "/home/reingo/mysite/flask_app.py", line 259, in extract_text 2019-12-19 22:48:24,827: nlp=spacy.load("es_core_news_sm") 2019-12-19 22:48:24,828: 2019-12-19 22:48:24,828: File "/home/reingo/.virtualenvs/myvirtualenv/lib/python3.6/site-packages/spacy/init.py", line 30, in load 2019-12-19 22:48:24,829: return util.load_model(name, **overrides)

2) running python3.6 -m spacy download es_core_news_sm --user gives me an error : usr/bin/python3.5 no module named spacy

for the life of me I can't remember how did I install the English version (but somehow it works , I can load it) - any ideas how/which console can install this additional module?

This help page explains how to install a package for a specific Python version, so if you do that for Python 3.6, you should then be able to run the download command.