pythonpython-3.xpython-2.7scikit-learn

Difference between scikit-learn and sklearn (now deprecated)


On OS X 10.11.6 and python 2.7.10 I need to import from sklearn manifold. I have numpy 1.8 Orc1, scipy .13 Ob1 and scikit-learn 0.17.1 installed.
I used pip to install sklearn(0.0), but when I try to import from sklearn manifold I get the following:

Traceback (most recent call last): File "", line 1, in File "/Library/Python/2.7/site-packages/sklearn/init.py", line 57, in from .base import clone File "/Library/Python/2.7/site-packages/sklearn/base.py", line 11, in from .utils.fixes import signature File "/Library/Python/2.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.

What is the difference between scikit-learn and sklearn? Also, I cant import scikit-learn because of a syntax error


Solution

  • You might need to reinstall numpy. It doesn't seem to have been installed correctly.

    sklearn is how you type the scikit-learn name in python (only the latter should be installed, the former is now deprecated).

    Also, try running the standard tests in scikit-learn and check the output. You will have detailed error information there.


    As a side note, do you have nosetests installed? Try: nosetests -v sklearn. You type this in bash, not in the python interpreter.