Spacy-nightly (spacy 2.0) issue with “thinc.extra.MaxViolation has wrong size”

…衆ロ難τιáo~ 提交于 2019-12-12 18:02:12

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!