scikit-learn 和 sklearn 的区别 [英] Difference between scikit-learn and sklearn
问题描述
在 OS X 10.11.6 和 python 2.7.10 上,我需要从 sklearn 流形导入.我安装了 numpy 1.8 Orc1、scipy .13 Ob1 和 scikit-learn 0.17.1.
我使用 pip 安装 sklearn(0.0),但是当我尝试从 sklearn 流形导入时,我得到以下信息:
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:
回溯(最近一次调用最后一次):文件",第 1 行,在文件/Library/Python/2.7/site-packages/sklearn/init.py",第 57 行,在从 .base 导入克隆文件/Library/Python/2.7/site-packages/sklearn/base.py",第 11 行,在从 .utils.fixes 导入签名文件/Library/Python/2.7/site-packages/sklearn/utils/init.py",行10、在 from .murmurhash 中导入 murmurhash3_32 文件numpy.pxd",第 155 行,在 init sklearn.utils.murmurhash 中(sklearn/utils/murmurhash.c:5029) ValueError: numpy.dtype 有大小不对,重新编译试试.
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.
scikit-learn 和 sklearn 有什么区别?还,由于语法错误,我无法导入 scikit-learn
What is the difference between scikit-learn and sklearn? Also, I cant import scikit-learn because of a syntax error
推荐答案
您可能需要重新安装 numpy.它似乎没有正确安装.
You might need to reinstall numpy. It doesn't seem to have installed correctly.
sklearn
是你在 python 中输入 scikit-learn 名称的方式.
sklearn
is how you type the scikit-learn name in python.
另外,尝试在 scikit-learn 中运行标准测试并检查输出.您将在那里获得详细的错误信息.
Also, try running the standard tests in scikit-learn and check the output. You will have detailed error information there.
您是否安装了nosetests
?尝试:nosetests -v sklearn
.你在 bash 中输入这个,而不是在 python 解释器中.
Do you have nosetests
installed? Try: nosetests -v sklearn
. You type this in bash, not in the python interpreter.
这篇关于scikit-learn 和 sklearn 的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!