- Download libsvm-3.24.tar.gz file from https://www.csie.ntu.edu.tw/~cjlin/libsvm/
- Unzip the .tar file in Terminal: $ tar xzvf libsvm-3.24.tar.gz
- Run $ make in both of the directories below: libsvm-3.24 and libsvm-3.24/python
- Move the folder libsvm-3.24 to usr/local/lib
- Copy svm.py, svmutil.py, and commonutil.py from libsvm-3.24/python to anaconda3/lib/python3.7
- Copy libsvm.so.2 from libsvm-3.24 to anaconda3/lib
- Download liblinear-2.30.tar.gz file from https://www.csie.ntu.edu.tw/~cjlin/liblinear/
- Unzip the .tar file in Terminal: $ tar xzvf liblinear-2.30.tar.gz
- Run $ make in both of the directories below: liblinear-2.30 and liblinear-2.30/python
- Move the folder liblinear-2.30 to the same directory of Jupyter Notebook, rename as liblinear_local
- When import package, use: from liblinear_local.python.liblinearutil import *
Source: Chih-Chung Chang and Chih-Jen Lin, LIBSVM : a library for support vector machines. ACM Transactions on Intelligent Systems and Technology, 2:27:1--27:27, 2011. Software available at http://www.csie.ntu.edu.tw/~cjlin/libsvm