Avi
Avi

Reputation: 2283

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'

Upvotes: 0

Views: 3296

Answers (2)

fracpete
fracpete

Reputation: 2608

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

Upvotes: 1

D. LaRocque
D. LaRocque

Reputation: 437

You can't import packages if there aren't installed with your interpreter. Try to install with pip :

pip install python-weka-wrapper

Edit : Start by looking at the documentation for python-weka-wrapper: https://fracpete.github.io/python-weka-wrapper/install.html

Upvotes: 1

Related Questions