Where is model 'en_core_web_sm'? #10959
-
We have Python 3.6 and spacy 3.3.1 installed on a server. After Why would this identical code work for some of us but not for others? My initial guess was that it had to do with the PYTHONPATH environment variable (we're running this under Linux), but in fact we all have the same path: Where exactly is this model stored? There doesn't seem to be any file en_core_web_sm.py (or .pyc) (which agrees with the error msg about it not being a Python package), so it's hard to see what the path should be. I tried tracing the code back in A more complete error msg would be something like "looked for file XXX in /usr/local/lib64/python... and in /user/local/lib/python..., but couldn't find this model". |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Solved my own problem (:). When I first installed this model, I did I figured this out by looking back through my history to see the full cmd I used to load it. I spent awhile longer trying to figure out how I would have known without looking at my history. Unlike a library module, the string repr of the model is not particularly helpful: |
Beta Was this translation helpful? Give feedback.
Solved my own problem (:). When I first installed this model, I did
python3 -m spacy download en_core_web_sm
which installed it locally, for me. I should have prefaced it with
sudo
, then it would have installed into the right place.I figured this out by looking back through my history to see the full cmd I used to load it. I spent awhile longer trying to figure out how I would have known without looking at my history. Unlike a library module, the string repr of the model is not particularly helpful:
<spacy.lang.en.English object at 0x7fa9d007ad68>
In particular, it doesn't say where it loaded from (unlike modules, which show the path they loaded from). It took me awhile, but eventually:
f…