Search code examples
pythonlibsvm

python, libsvn and cant file python imports


I have installed libsvm-3.12 and placed into:

  • /home/ubuntu/libsvm-3.12

In my pythonpath I have the following:

echo $PYTHONPATH
/home/ubuntu/libsvm-3.12/python:/home/ubuntu/libsvm-3.12:$PYTHONPATH

This is in both .bashrc in home and in /etc/enviroments

I rebooted the machine.

From python I get:

>>> import svmulti
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named svmulti

How do I let python know where the lib is?


Solution

  • Given installation via make in .../libsvm-3.12/python,I think you also want:

    >>> import svmutil
    

    not:

    >>> import svmulti