我想使用scikit-learn svm來根據主題對電子郵件進行分類。但是,我無法從sklearn導入svm模塊。我已經安裝了sklearn。我得到的錯誤如下:scikit使用svm錯誤學習
>>> from sklearn import svm
Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
from sklearn import svm
File "C:\Python27\lib\site-packages\sklearn\svm\__init__.py", line 13, in <module>
from .classes import SVC, NuSVC, SVR, NuSVR, OneClassSVM, LinearSVC
File "C:\Python27\lib\site-packages\sklearn\svm\classes.py", line 1, in <module>
from .base import BaseLibLinear, BaseSVC, BaseLibSVM
File "C:\Python27\lib\site-packages\sklearn\svm\base.py", line 8, in <module>
from . import libsvm, liblinear
File "numpy.pxd", line 155, in init sklearn.svm.libsvm (sklearn\svm\libsvm.c:9096)
ValueError: numpy.dtype has the wrong size, try recompiling
任何建議,將不勝感激。謝謝!
可能重複:http://stackoverflow.com/questions/17709641/valueerror-numpy-dtype-has-the-wrong-size-try-recompiling – zhangxaochen