chartbeat-labs / textacy

NLP, before and after spaCy
https://textacy.readthedocs.io
Other
2.21k stars 249 forks source link

numpy.ufunc has the wrong size, try recompiling #218

Closed AYEG closed 5 years ago

AYEG commented 5 years ago

Just want to put this here in case someone else receives the same errors. Somehow started getting these errors causing my flask app to crash,

import textacy.keyterms File "/usr/local/lib/python3.6/site-packages/textacy/keyterms.py", line 23, in from . import similarity File "/usr/local/lib/python3.6/site-packages/textacy/similarity.py", line 20, in from pyemd import emd File "/usr/local/lib/python3.6/site-packages/pyemd/init.py", line 75, in from .emd import emd, emd_with_flow, emd_samples File "init.pxd", line 885, in init pyemd.emd ValueError: numpy.ufunc has the wrong size, try recompiling. Expected 192, got 216

I tried uninstalling and reinstalling numpy , pyemd, scikit-learn during the build which didn't help.

A solution to this problem is to use pip install with --no-cache-dir

AYEG commented 5 years ago

Use pip install with --no-cache-dir to resolve this issue

bdewilde commented 5 years ago

Thanks for posting, plus a solution! These sorts of errors can be frustrating.