2

I have been trying unssuccessfully so far to install the package for Weka (Weka 0.1.3)found here on my Windows computer. My problem is that each time I try to run the setup or use the command:

pip install -U https://github.com/chrisspen/weka/tarball/master

I get an assertion error saying that

"Weka JAR file /usr/share/java/weka.jar not found. Ensure the file is installed or update your environment's WEKA_JAR_PATH to only include valid locations."

Indeed I do not have this file, but how should I get it? I am not sure if I missed anything regarding the installation, at least I did what's specified on the official webpage.

Any suggestions? Many thanks!

2 Answers 2

1

Since this is a wrapper package you need to install Weka, (presumably for windows), as well - it is here you may also have to upgrade or install java.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for the answer! I also did that, so I have installed Weka 3.6.10, but it's a desktop application. Thought I can use it directly from Python somehow..
Try downloading and unzipping the zip format - then set WEKA_JAR_PATH to point to where you unzipped it.
1

To run in Windows:

  • Add weka.jar, libsvm.jar, wlsvm.jar to C:\usr\share\java directory (libsvm.jar and wlsvm.jar can be found at http://www.cs.iastate.edu/~yasser/wlsvm/)
  • run pip install -U https://github.com/chrisspen/weka/tarball/master
  • When you try to run classifiers you will get a classpath error. To solve this error edit installed file <Python install dir>\Lib\site-packages\weka\classifiers.py
  • Line 33: Change for _cp in CP.split(':'): to for _cp in CP.split(os.pathsep):
  • Line 286: Change close_fds=True to close_fds=sys.platform != "win32"

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.