本文介绍了带有"thinc.extra.MaxViolation的大小不正确"的每晚半夜(spacy 2.0)问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在似乎成功地安装了spacy-nightly(spacy-nightly-2.0.0a14)和英语模型(en_core_web_sm)之后,在尝试运行它时仍收到错误消息

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

我也尝试重新安装spacy和model,但它没有帮助.在新的venv(Python 3.6)中再次尝试过

I tried to reinstall spacy and model as well and it has not help. Tried it again within new venv (Python 3.6)

推荐答案

问题可能与Thinc软件包有关,spacy-nightly需要Thinc< 6.9.0,> = 6.8.1,但是版本6.8.2引起了一些问题- >如何解决我的问题 t是在安装spacy-nightly每晚之前运行之前的命令

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.

后来我发现,我不是唯一面临此问题的人 https://github .com/explosion/spaCy/issues/1374

I found later on that I am not the only one facing this issue https://github.com/explosion/spaCy/issues/1374

这篇关于带有"thinc.extra.MaxViolation的大小不正确"的每晚半夜(spacy 2.0)问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-02 07:49