Model en_core_med7_lg not loading
ervivek opened this issue · comments
I am loading following med7 library with spacy 3 -
pip install https://med7.s3.eu-west-2.amazonaws.com/en_core_med7_trf.tar.gz
while loading the model (en_core_med7_lg), getting following error -
OSError: [E050] Can't find model 'en_core_med7_lg'. It doesn't seem to be a Python package or a valid path to a data directory.
@ervivek en_core_med7_lg
is designed for spaCy 2, whilst en_core_med7_trf
for spaCy 3.
Make sure you installed all transformers-related libraries with spaCy (https://spacy.io/usage#quickstart)
Simply use:
import spacy
nlp = spacy.load('en_core_med7_trf')
@ervivek The error you mentioned is not specific to Med7, but rather something went wrong while you installed spaCy
. Start with a new virtual environment, make sure you fresh install spaCy
with transformers and dependencies. Then test if you can load the original spaCy transformers:
python -m venv .env
source .env/bin/activate
pip install -U pip setuptools wheel
pip install spacy[lookups, transformers]
python -m spacy download en_core_web_trf
once all went well, try to load the trf
model:
import spacy
nlp = spacy.load('en_core_web_trf')
If all worked well, then you should be able to install and load in the same way the en_core_med7_trf
Model is loading now.
Thanks