问题
After apparently successful installation of spacy-nightly (spacy-nightly-2.0.0a14) and english model (en_core_web_sm) I was still receiving error message during attempt to run it
import spacy
nlp = spacy.load('en_core_web_sm')
ValueError: thinc.extra.search.MaxViolation has the wrong size, try recompiling. Expected 104, got 128
I tried to reinstall spacy and model as well and it has not help. Tried it again within new venv (Python 3.6)
回答1:
Issue is probably with thinc package, spacy-nightly needs thinc<6.9.0,>=6.8.1 but version 6.8.2 is causing some issues --> way how to solve it is run command bellow before you install spacy-nightly
pip install thinc==6.8.1
After this everything works perfectly fine for me.
I found later on that I am not the only one facing this issue https://github.com/explosion/spaCy/issues/1374
来源:https://stackoverflow.com/questions/46544808/spacy-nightly-spacy-2-0-issue-with-thinc-extra-maxviolation-has-wrong-size