spacy.cli.download
doesn't work for transformer model
#13079
-
How to reproduce the behaviour
import spacy
spacy.cli.download('en_core_web_trf')
nlp = spacy.load('en_core_web_trf')
Apparently, Your Environment
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Thanks for the report! Some context as to why this happens: The We'll look into updating the error message to make it clarify this error case. |
Beta Was this translation helpful? Give feedback.
-
Was there a resolution to this? Do we just use |
Beta Was this translation helpful? Give feedback.
Thanks for the report! Some context as to why this happens: The
spacy[transformers]
extra package only installsspacy-transformers
whereas the models in 3.7.x depend onspacy-curated-transformers
. So, the entry points in the latter are not initialized during the firstimport spacy
call. Thespacy.cli.download
invocation installs the dependency, but it's too late to reload the entry points, which is why one needs to reload the interpreter/REPL.We'll look into updating the error message to make it clarify this error case.