pythonpiplibsvm

ImportError: No module named libsvm in Python 3


from libsvm import svmutil
ImportError: No module named libsvm

I have the module libsvm installed. Because when I run pip3 install libsvm, I see this:

Requirement already satisfied: libsvm in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (3.23.0.4)

So what's causing the error?


Solution

    1. make sure you are using the same python version, when you install the library and you run it. fyi, pip3 is for python 3.
    2. my suggestion is create new virtual environment and activate then install all library that needed, then run your app from there.