Search code examples
pythonweka

Why do I get an Error in import weka in python


I tried to import weka in python:

import sys
import weka.core.jvm as jvm

I get an error:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-42-7f797cd58f75> in <module>()
      1 import sys
----> 2 import weka.core.jvm as jvm
ImportError: No module named 'weka'

Solution

  • You can sidestep the compilation of javabridge by downloading a wheel file instead (from here). See the full instructions for Windows here.