I have been trying to install and use scikit-learn and nltk. However, I get the following error while importing anything:
Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.7/site-packages/sklearn/init.py", line 57, in from .base import clone File "/usr/local/lib/python2.7/site-packages/sklearn/base.py", line 11, in from .utils.fixes import signature File "/usr/local/lib/python2.7/site-packages/sklearn/utils/init.py", line 10, in from .murmurhash import murmurhash3_32 File "numpy.pxd", line 155, in init sklearn.utils.murmurhash (sklearn/utils/murmurhash.c:5029) ValueError: numpy.dtype has the wrong size, try recompiling
I did a pip uninstall numpy
followed by a pip install numpy
and also a pip uninstall scikit-learn
and again reinstalled it. But the error persists.
easy_install --upgrade numpy
. Then you can install scikit-learn by using pip. – Guiem Bosch