我已經嘗試使用conda以及pip命令安裝libsvm。 pip命令沒有爲conda環境安裝libsvm,當我使用命令「conda install -c conda-forge libsvm = 3.21」(在各種網站上推薦)將它安裝到conda環境中時,我仍然無法在我的導入svm程序。 它顯示錯誤 - '導入錯誤:沒有模塊名爲SVM'如何在conda環境中安裝libsvm,以便我可以在anaconda中導入svm?
In conda list libsvm is shown as follows maybe it has to do something with vc9_1 build instead py27_0/py27_1/py27_21
附:我正在使用python 2.7
libsvm是一個C庫,而不是Python包,因此您將無法從Python以這種方式導入它。有興趣使用libsvm的特定Python包裝嗎? – jakevdp
我想實現SVM分類器,因爲我引用的代碼已經導入了svm,並且僅在python中使用了它的所有函數。 – amighty
如果你想用Python做SVM,你可以試試scikit-learn的SVM分類器,它包裝了libsvm:http://scikit-learn.org/stable/modules/svm.html – jakevdp