尝试在 Heroku 上运行 spaCy。如果我打开一个 REPL heroku run python
,我可以很高兴地import spacy
和nlp=spacy.load('en')
,但是如果我尝试:
from spacy.pipeline import EntityRecognizer
我收到一个错误:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "spacy/pipeline.pyx", line 1, in init spacy.pipeline (spacy/pipeline.cpp:14821)
ValueError: spacy.syntax.parser.Parser has the wrong size, try recompiling
模型似乎已正确下载,而且我不是从源代码构建的。所以不确定错误可能在哪里。