huggingface / neuralcoref

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

ModuleNotFoundError: No module named 'neuralcoref.neuralcoref' #325

Open SarahND97 opened 2 years ago

SarahND97 commented 2 years ago

Hello! When trying to run the command: python -m neuralcoref.train.conllparser --path <path-to-data>

We get the error:

 File “/neuralcoref/neuralcoref/__init__.py", line 12, in <module>
    from neuralcoref.neuralcoref import NeuralCoref
ModuleNotFoundError: No module named 'neuralcoref.neuralcoref'

We followed the steps in: https://github.com/huggingface/neuralcoref/blob/master/neuralcoref/train/training.md#prepare-the-data, but still get this error. There seems to be some issue with finding the correct pyx/cpp-file, since it doesn’t even find that. Is there something that we need to do that is not included in the guide?

Thanks in advance!

ravikanagpal commented 2 years ago

Hi @SarahND97 , I am also facing the same issue. Did you find the resolution?

SarahND97 commented 2 years ago

We temporarily commented out the line from neuralcoref.neuralcoref import NeuralCoref in the init.py-file.

sanaullahaq commented 2 years ago

@SarahND97 any other way that you tried? or still with temporal commenting of from neuralcoref.neuralcoref import NeuralCoref

SarahND97 commented 2 years ago

Nope we went with commenting out the line and it worked for what we wanted to use the code for.

kaifangDeng commented 1 year ago

Same error. I find it was caused by .pyx file and solved it by run setup.py through python setup.py build_ext --inplace