spaCy: ValueError: spacy.syntax.nn_parser.Parser size changed, may indicate binary incompatibility. Expected 72 from C header, got 64 from PyObject
I’ve seen this issue pop up a few other times, but most people report solving with a quick uninstall and reinstall. I’ve tried that several times to no avail.
My code:
import spacy
!python -m spacy download en
from spacy.lang.en import English
parser = English()
import en_core_web_sm
nlp = spacy.load('en_core_web_sm')
Full traceback:
Requirement already satisfied: en_core_web_sm==2.0.0 from https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.0.0/en_core_web_sm-2.0.0.tar.gz#egg=en_core_web_sm==2.0.0 in /Users/lmcquillan/anaconda3/lib/python3.7/site-packages (2.0.0)
Linking successful
/Users/lmcquillan/anaconda3/lib/python3.7/site-packages/en_core_web_sm
-->
/Users/lmcquillan/anaconda3/lib/python3.7/site-packages/spacy/data/en
You can now load the model via spacy.load('en')
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-8-9016a6b1ed29> in <module>
2
3
----> 4 from spacy.lang.en import English
5 parser = English()
6 import en_core_web_sm
~/anaconda3/lib/python3.7/site-packages/spacy/lang/en/__init__.py in <module>
13 from ..tokenizer_exceptions import BASE_EXCEPTIONS
14 from ..norm_exceptions import BASE_NORMS
---> 15 from ...language import Language
16 from ...attrs import LANG, NORM
17 from ...util import update_exc, add_lookups
~/anaconda3/lib/python3.7/site-packages/spacy/language.py in <module>
16 from .vocab import Vocab
17 from .lemmatizer import Lemmatizer
---> 18 from .pipeline import DependencyParser, Tensorizer, Tagger, EntityRecognizer
19 from .pipeline import SimilarityHook, TextCategorizer, SentenceSegmenter
20 from .pipeline import merge_noun_chunks, merge_entities
~/anaconda3/lib/python3.7/site-packages/spacy/pipeline/__init__.py in <module>
2 from __future__ import unicode_literals
3
----> 4 from .pipes import Tagger, DependencyParser, EntityRecognizer
5 from .pipes import TextCategorizer, Tensorizer, Pipe
6 from .entityruler import EntityRuler
pipes.pyx in init spacy.pipeline.pipes()
ValueError: spacy.syntax.nn_parser.Parser size changed, may indicate binary incompatibility. Expected 72 from C header, got 64 from PyObject
My Environment: spaCy version: 2.0.16 Platform: Darwin-18.7.0-x86_64-i386-64bit Python version: 3.7.3 Models: en
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 16 (8 by maintainers)
After this, I still hit the same error running
from spacy.lang.en import English. and pip list returns the following: