how to do a weka API call

65 views
Skip to first unread message

Qihong Kuang

unread,
Apr 17, 2018, 4:30:34 PM4/17/18
to python-weka-wrapper
I want to use the classifier in weka in python. However, it said "no module call "weka.core" and no module call "javabridge" when I run. I follow the instruction to install python weka wrapper but it still says the same thing

Peter Reutemann

unread,
Apr 17, 2018, 4:38:57 PM4/17/18
to python-weka-wrapper
> I want to use the classifier in weka in python. However, it said "no module
> call "weka.core" and no module call "javabridge" when I run. I follow the
> instruction to install python weka wrapper but it still says the same thing

What were the steps that you used to install python-weka-wrapper
(Python 2.7 or Python 3 version)?
What's your OS (Linux/Mac/Windows)? Are you using a virtual environment?

Cheers, Peter
--
Peter Reutemann
Dept. of Computer Science
University of Waikato, NZ
+64 (7) 858-5174
http://www.cms.waikato.ac.nz/~fracpete/
http://www.data-mining.co.nz/

Qihong Kuang

unread,
Apr 17, 2018, 4:53:34 PM4/17/18
to python-weka-wrapper
My OS is Windows. I install numpy, javabridge. and I use python 2.7

Peter Reutemann

unread,
Apr 17, 2018, 5:01:02 PM4/17/18
to python-weka-wrapper
> My OS is Windows. I install numpy, javabridge. and I use python 2.7

You followed these instructions here?
http://fracpete.github.io/python-weka-wrapper/install.html#windows

When you installed javabridge, did you get any errors?

Qihong Kuang

unread,
Apr 17, 2018, 5:06:11 PM4/17/18
to python-weka-wrapper


No, I didn't get any errors. Below are my installations.

Peter Reutemann

unread,
Apr 17, 2018, 5:18:04 PM4/17/18
to python-weka-wrapper
> No, I didn't get any errors. Below are my installations.

Seems alright.

Can you please run the following command and post the output (as text,
not a screenshot):
pip freeze

And your Java version:
java -version

Qihong Kuang

unread,
Apr 17, 2018, 5:20:42 PM4/17/18
to python-weka-wrapper
Hi Peter! Below is my python version and java version

Peter Reutemann

unread,
Apr 17, 2018, 5:25:28 PM4/17/18
to python-weka-wrapper
> Hi Peter! Below is my python version and java version

Try with Java 8.

Mohd Faisal

unread,
Apr 17, 2018, 6:15:25 PM4/17/18
to python-weka-wrapper
I am getting a similar error. 


I did everything as told in the instructions except for installing Xcode(but have install XCode command-line tools). Plus do we have to set any paths. If yes can you tell how.

Peter Reutemann

unread,
Apr 17, 2018, 6:22:59 PM4/17/18
to python-weka-wrapper
> I am getting a similar error.
>
>
> I did everything as told in the instructions except for installing Xcode(but have install XCode command-line tools). Plus do we have to set any paths. If yes can you tell how.

Sorry, but I don't have access to a Mac. What's your Java version?

Mohd Faisal

unread,
Apr 17, 2018, 6:29:57 PM4/17/18
to python-we...@googlegroups.com
Java 8.
I did everything explained here https://www.youtube.com/watch?v=CORXWYam36E
Should I create a new Environment and again install everything.

--
You received this message because you are subscribed to the Google Groups "python-weka-wrapper" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-weka-wrapper+unsub...@googlegroups.com.
To post to this group, send email to python-weka-wrapper@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python-weka-wrapper/CAHoQ12L6s_sfikfi2Xtq%2B3W5j4eD%2B3XtBCiJJnrAD_4raaOx_g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Peter Reutemann

unread,
Apr 17, 2018, 6:37:13 PM4/17/18
to python-weka-wrapper
> Java 8.
> I did everything explained here https://www.youtube.com/watch?v=CORXWYam36E
> Should I create a new Environment and again install everything.

These videos were create a while ago when I had access to a Mac
(actually a virtual machine). It is more than possible that things
have changed since then.

Since I can't unfortunately help in your case, how about:
- install VirtualBox (https://www.virtualbox.org/wiki/Downloads)
- set up a new virtual machine using eg Ubuntu
- install pww (or pww3) in the virtual machine:
Python 2.7
http://fracpete.github.io/python-weka-wrapper/install.html#ubuntu
Python 3.x
http://fracpete.github.io/python-weka-wrapper3/install.html#ubuntu

Mohd Faisal

unread,
Apr 18, 2018, 11:13:28 AM4/18/18
to python-we...@googlegroups.com
Now it is working, it was some problem with the environment in Jupyter notebook.
Well, thanks for the assistance.

--
You received this message because you are subscribed to the Google Groups "python-weka-wrapper" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-weka-wrapper+unsub...@googlegroups.com.
To post to this group, send email to python-weka-wrapper@googlegroups.com.

Peter Reutemann

unread,
Apr 18, 2018, 5:26:33 PM4/18/18
to python-weka-wrapper
> Now it is working, it was some problem with the environment in Jupyter
> notebook.
> Well, thanks for the assistance.

Great that it's working!

Since other people had problems with using pww in combination with
Jupyter (and I don't use Jupyter), would you be willing to share how
you managed to get it going?
Reply all
Reply to author
Forward
0 new messages