I want to use Weka in my python code, so I install java-wrapper python(2.7.16 ) according to https://fracpete.github.io/python-weka-wrapper/install.html and my java version is:
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)
Also, I added the JDK path to user variable PATH according to https://troubleshooter.xyz/wiki/fix-java-virtual-machine-jvm-not-found-error/
but it raise error:
>>>import os
>>>import traceback
>>>import weka.core.jvm as jvm
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
import weka.core.jvm as jvm
File "C:\Python27\lib\site-packages\weka\core\jvm.py", line 17, in <module>
import javabridge
File "C:\Python27\lib\site-packages\javabridge\__init__.py", line 38, in <module>
from .jutil import start_vm, kill_vm, vm, activate_awt, deactivate_awt
File "C:\Python27\lib\site-packages\javabridge\jutil.py", line 151, in <module>
os.pathsep + os.path.join(find_javahome(), "bin")
File "C:\Python27\lib\site-packages\javabridge\jutil.py", line 139, in _find_jvm
raise JVMNotFoundError()
JVMNotFoundError: Can't find the Java Virtual Machine
I am using Windows 10, Does it may be related to my Windows?
for both user variable and system variable --> JAVA_HOME=C:\Program Files\Java\jdk1.8.0_181\bin and JAVA_HOME= C:\Program Files\Java\jre1.8.0_181\bin
PATH=C:\Program Files\Java\jdk1.8.0_181\bin and PATH=C:\Program Files\Java\jre1.8.0_181\bin
--
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-wra...@googlegroups.com.
To post to this group, send email to python-we...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python-weka-wrapper/44f34847-023e-4cd8-97f5-75ee1b823382%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--