I'm trying to run Weka on Jupyter Python (I have python 3.9). I've followed
these steps: https://github.com/MuneebAhmedQureshi/Using-Weka-and-Python-for-Data-Mining-Jupyter-Notebook/blob/master/weka-from-mooks-graphs.ipynb All packages were installed well. However, it looks not all packages in JN were loaded correctly, this is the message I got after running 'jvm.start(packages=True) ' DEBUG:weka.core.jvm:Adding bundled jars DEBUG:weka.core.jvm:Classpath=['C:\\Users\\cttc\\anaconda3\\lib\\site-packages\\javabridge\\jars\\rhino-1.7R4.jar', 'C:\\Users\\cttc\\anaconda3\\lib\\site-packages\\javabridge\\jars\\runnablequeue.jar', 'C:\\Users\\cttc\\anaconda3\\lib\\site-packages\\javabridge\\jars\\cpython.jar', 'C:\\Users\\cttc\\anaconda3\\lib\\site-packages\\weka\\lib\\python-weka-wrapper.jar', 'C:\\Users\\cttc\\anaconda3\\lib\\site-packages\\weka\\lib\\weka.jar'] DEBUG:weka.core.jvm:MaxHeapSize=default DEBUG:weka.core.jvm:Package support enabled --------------------------------------------------------------------------- JavaException Traceback (most recent call last) <ipython-input-6-1e9aea12370a> in <module> ----> 1 jvm.start(packages=True) ~\anaconda3\lib\site-packages\weka\core\jvm.py in start(class_path, bundled, packages, system_cp, max_heap_size, system_info) 141 "Lweka/core/WekaPackageManager;", "loadPackages", 142 "(Z)V", --> 143 False) 144 145 # output system info ~\anaconda3\lib\site-packages\javabridge\jutil.py in static_call(class_name, method_name, sig, *args) 941 ret_sig = sig[sig.find(')')+1:] 942 nice_args = get_nice_args(args, args_sig) --> 943 result = fn(*nice_args) 944 return get_nice_result(result, ret_sig) 945 ~\anaconda3\lib\site-packages\javabridge\jutil.py in fn(*args) 921 jexception = env.exception_occurred() 922 if jexception is not None: --> 923 raise JavaException(jexception) 924 return result 925 return fn JavaException: <Java object at 0x24dc40e8> Consequently, I cannot load arff files since I get an error. Note: I'm not running the jupyter on a virt env. Any clue? -- Sent from: https://weka.8497.n7.nabble.com/ _______________________________________________ Wekalist mailing list -- [hidden email] Send posts to [hidden email] To unsubscribe send an email to [hidden email] To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html |
> I'm trying to run Weka on Jupyter Python (I have python 3.9). I've followed
> these steps: > > https://github.com/MuneebAhmedQureshi/Using-Weka-and-Python-for-Data-Mining-Jupyter-Notebook/blob/master/weka-from-mooks-graphs.ipynb > > All packages were installed well. However, it looks not all packages in JN > were loaded correctly, this is the message I got after running > 'jvm.start(packages=True) ' > > > DEBUG:weka.core.jvm:Adding bundled jars > DEBUG:weka.core.jvm:Classpath=['C:\\Users\\cttc\\anaconda3\\lib\\site-packages\\javabridge\\jars\\rhino-1.7R4.jar', > 'C:\\Users\\cttc\\anaconda3\\lib\\site-packages\\javabridge\\jars\\runnablequeue.jar', > 'C:\\Users\\cttc\\anaconda3\\lib\\site-packages\\javabridge\\jars\\cpython.jar', > 'C:\\Users\\cttc\\anaconda3\\lib\\site-packages\\weka\\lib\\python-weka-wrapper.jar', > 'C:\\Users\\cttc\\anaconda3\\lib\\site-packages\\weka\\lib\\weka.jar'] > DEBUG:weka.core.jvm:MaxHeapSize=default > DEBUG:weka.core.jvm:Package support enabled > --------------------------------------------------------------------------- > JavaException Traceback (most recent call last) > <ipython-input-6-1e9aea12370a> in <module> > ----> 1 jvm.start(packages=True) [...] > Note: I'm not running the jupyter on a virt env. I do not recommend using Jupyter Notebooks in conjunction with the python-weka-wrapper library. The underlying javabridge cannot restart (or at least did for a very long time, haven't tested that recently) the JVM within the same process, which would be the case when re-running cells in Jupyter Notebooks. Instead, just write your scripts in a simple text editor or an IDE like PyCharm and execute your code from there. You can use the Python interpreter from your existing virtual environment to execute your code. Cheers, Peter -- Peter Reutemann Dept. of Computer Science University of Waikato, NZ +64 (7) 577-5304 http://www.cms.waikato.ac.nz/~fracpete/ http://www.data-mining.co.nz/ _______________________________________________ Wekalist mailing list -- [hidden email] Send posts to [hidden email] To unsubscribe send an email to [hidden email] To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html |
Free forum by Nabble | Edit this page |