Home > Software design >  ImportError: No module named libsvm in Python 3
ImportError: No module named libsvm in Python 3

Time:10-03

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?

CodePudding user response:

Try the followings, it may solve the problem:

0- Run your code with Python version 3 and above. (python3 yourFile.py in the terminal)

1- pip3 install libsvm

2- pip install -U libsvm-official

CodePudding user response:

  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.
  • Related