neuralcoref
neuralcoref copied to clipboard
AttributeError: type object 'neuralcoref.neuralcoref.array' has no attribute '__reduce_cython__'
Happens when I do:
pip uninstall neuralcoref
pip install neuralcoref --no-binary neuralcoref
# Load your usual SpaCy model (one of SpaCy English models)
import spacy
nlp = spacy.load('en')
# Add neural coref to SpaCy's pipe
import neuralcoref
neuralcoref.add_to_pipe(nlp)
# You're done. You can now use NeuralCoref as you usually manipulate a SpaCy document annotations.
doc = nlp(u'My sister has a dog. She loves him.')
doc._.has_coref
doc._.coref_clusters
Have you tried starting from a new virtual environment ?
Happens when I do:
pip uninstall neuralcoref pip install neuralcoref --no-binary neuralcoref # Load your usual SpaCy model (one of SpaCy English models) import spacy nlp = spacy.load('en') # Add neural coref to SpaCy's pipe import neuralcoref neuralcoref.add_to_pipe(nlp) # You're done. You can now use NeuralCoref as you usually manipulate a SpaCy document annotations. doc = nlp(u'My sister has a dog. She loves him.') doc._.has_coref doc._.coref_clusters
Hey, Did you find a solution for this problem?
Have you tried starting from a new virtual environment ?
Uninstalling using: pip uninstall neuralcoref, reinstalling using: pip install neuralcoref --no-binary neuralcoref
And then restarting the kernel of my env solved the issue and the model imports just fine. For me the issue arose from not restarting the kernel between reinstallation and importing.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I was recently getting this error when I try to use neuralcoref on Colab (Python 3.7).
If I reinstalled neuralcoref (like @stephenmathew suggests) and then restarted the runtime, I kept getting the spacy.strings.StringStore size changed error. If I restarted the runtime after reinstalling, I would get this no attribute '__reduce_cython__' error.
The solution was using spacy 2.1: python -m pip install spacy==2.1.0
I'm facing the same issue:
spaCy version 3.2.3 Location C:\Users\botti\anaconda3\envs\tesienv\lib\site-packages\spacy Platform Windows-10-10.0.22000-SP0 Python version 3.7.11 Pipelines en_core_web_md (3.0.0), en_core_web_sm (3.2.0), it_core_news_md (3.0.0)
@fbottazzoli , read @lara-martin's message carefully... use spacy 2.1
I'm facing the same issue:
spaCy version 3.2.3 Location C:\Users\botti\anaconda3\envs\tesienv\lib\site-packages\spacy Platform Windows-10-10.0.22000-SP0 Python version 3.7.11 Pipelines en_core_web_md (3.0.0), en_core_web_sm (3.2.0), it_core_news_md (3.0.0)
I was recently getting this error when I try to use neuralcoref on Colab (Python 3.7). If I reinstalled neuralcoref (like @stephenmathew suggests) and then restarted the runtime, I kept getting the
spacy.strings.StringStore size changederror. If I restarted the runtime after reinstalling, I would get thisno attribute '__reduce_cython__'error.The solution was using spacy 2.1:
python -m pip install spacy==2.1.0
Nope it didn't work