1

I am facing an issue when trying to call spaCy into my Jupyter notebook. When I run import spacy I get the below: enter image description here

I have used spaCy before many times with no issue, but I noticed this problem began after I was trying to also install from neuralcoref import Coref and am not sure if that has caused this.

When I go into the terminal and run conda list spacy it looks like spaCy is available: enter image description here

I do not really understand what the errors are suggesting, but I tried to reinstall murmurhash using conda install -c anaconda murmurhash after which I got this. This is just a screenshot of the first few but there are MANY packages that are allegedly causing the inconsistency:

enter image description here

Following the list of packages causing inconsistencies, I get this: enter image description here

For reference, I am using MacOS and python 3.7. How can I fix this?

PugFanatic
  • 31
  • 2
  • 9

1 Answers1

1

spacy>=3.0 and neuralcoref are currently not compatible - the Cython API of spaCy's v3 has changed too much. This might be causing conflicts in your environment?

Sofie VL
  • 2,931
  • 2
  • 12
  • 22
  • Interesting...`neuralcoref` does not even appear when I run `conda list` or `pip list`. I uninstalled and reinstalled `spacy` using `conda install -c conda-forge spacy` from the spaCy documentation, after which I see `spaCy 3.0.5` and `spaCy legacy 3.0.2` in `conda list`. However when I proceed to next step, `python -m spacy download en_core_web_sm`, I again get ImportError: cannot import name 'hash_unicode' from 'murmurhash' – PugFanatic Apr 15 '21 at 19:09
  • I mentioned this because you said "this problem began after I was trying to also install from neuralcoref import Coref". Between v2 and v3 of spaCy, quite a bit of the Cython classes have changed. It is possible than an attempt to install `neuralcoref` installed/referenced some older v2 stuff that is not properly being cleaned up by a reinstall. Is it an option to try again from a clean environment (and stay clear of neuralcoref) to check whether you'd run into the same issue? – Sofie VL Apr 16 '21 at 12:05
  • 1
    @SofieLV Yep, thats what I ended up doing, and things seem to work now, thank you for letting me know of the incompatibility of my version of `spaCy` and `neuralcoref`. Steering clear of neuralcoref for the time being! – PugFanatic Apr 16 '21 at 17:50