pybrisque
pybrisque copied to clipboard
Not able to run code
Hi~
Thanks for sharing your work.
but when i run examples.ipynb , i get
AttributeError: /usr/lib/libsvm.so.3: undefined symbol: svm_get_sv_indices
I run it in Ubuntu 16.04 and l have excute the command:
apt-get install libsvm-dev
and
pip install --process-dependency-links pybrisque
successfully
Any suggestions would be helpful.
Thanks in advance.
Hi @ShaofengZou, it seems that in Ubuntu 16.04, the libsvm that is distributed is version 3.12 (while the python-binding that we use during the installation of pybrisque is 3.14) and there's breaking changes between them.
You can solve this issue by uninstalling libsvm from pybrisque i.e pip uninstall libsvm
and install python-libsvm
from distribution i.e apt install python-libsvm
(which will have the exact same libsvm 3.12). If you can't import svm, you can try to add /usr/share/pyshared
to your PYTHONPATH.
Cheers
Hey, I did that. It seems that the default model type
for libsvm
might be different in 3.12
. On reading allmodel
I get, argument 1: <class 'TypeError'>: wrong type
, how do I resolve this?
Line: model = libsvm.svm_load_model(model_file_name)
in /usr/share/pyshared/svmutil.py