neuralcoref icon indicating copy to clipboard operation
neuralcoref copied to clipboard

ModuleNotFoundError: No module named 'neuralcoref.neuralcoref'

Open SarahND97 opened this issue 3 years ago • 5 comments

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!

SarahND97 avatar Sep 28 '21 14:09 SarahND97

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

ravikanagpal avatar Nov 13 '21 09:11 ravikanagpal

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

SarahND97 avatar Nov 15 '21 13:11 SarahND97

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

sanaullahaq avatar Jan 29 '22 19:01 sanaullahaq

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

SarahND97 avatar Jan 30 '22 13:01 SarahND97

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

kaifangDeng avatar Apr 09 '23 09:04 kaifangDeng