知道为什么以下不起作用?我也将Python的版本设置为2.7。我甚至用sklearn
重新安装了pip
,希望它能安装但不起作用!任何帮助都非常感谢!
>>> from sklearn import svm
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sklearn/svm/__init__.py", line 13, in <module>
from .classes import SVC, NuSVC, SVR, NuSVR, OneClassSVM, LinearSVC
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sklearn/svm/classes.py", line 1, in <module>
from .base import BaseLibLinear, BaseSVC, BaseLibSVM
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sklearn/svm/base.py", line 8, in <module>
from . import libsvm, liblinear
File "numpy.pxd", line 861, in init sklearn.svm.libsvm (sklearn/svm/libsvm.c:9100)
ValueError: numpy.ufunc has the wrong size, try recompiling
>>> import sklearn
>>>