huggingface / neuralcoref

✨Fast Coreference Resolution in spaCy with Neural Networks
https://huggingface.co/coref/
MIT License
2.83k stars 474 forks source link

Python 3.8.x ValueError: spacy.strings.StringStore size changed #316

Closed paulthemagno closed 2 years ago

paulthemagno commented 3 years ago

Installing coref in this way:

!pip3 install neuralcoref --no-binary neuralcoref

on a Jupyter Notebook with Python 3.8.8 I'm getting this error during import neuralcoref:

ValueError: spacy.strings.StringStore size changed, may indicate binary incompatibility. Expected 112 from C header, got 64 from PyObject

I read this is a known error and should be fixed installing with the --no-binary neuralcoref parameter, but this doesn't work for me. In addition if I re-execute the cell where the import is, the error changes with:

AttributeError: type object 'neuralcoref.neuralcoref.array' has no attribute '__reduce_cython__'

Is there an incompatibility with Python 3.8.x? I don't see anything on the documentation, but I see many users are saying to use Python 3.7.

paulthemagno commented 2 years ago

For who is interested I managed by installing from source code:

git clone https://github.com/huggingface/neuralcoref.git
pip3 install -r neuralcoref/requirements.txt
pip3 install -e neuralcoref/.

On a Notebook I had to restart Kernel, then I did import neuralcoref successfully 🙌

yuleiqin commented 11 months ago

For who is interested I managed by installing from source code:

git clone https://github.com/huggingface/neuralcoref.git
pip3 install -r neuralcoref/requirements.txt
pip3 install -e neuralcoref/.

On a Notebook I had to restart Kernel, then I did import neuralcoref successfully 🙌

thanks, you save my day