Run WEKA and open the Explorer: java -Xmx4G -jar weka.jar Note: The following examples work with the newest version of the package. In /Users/yifeiluo/.conda/envs/prac2_sample_code.py/lib/python3.5/site-packages/javabridge/_ package can be used from the Weka GUI or the command line. Referenced from: /Users/yifeiluo/.conda/envs/prac2_sample_code.py/lib/python3.5/site-packages/javabridge/_ ImportError: dlopen(/Users/yifeiluo/.conda/envs/prac2_sample_code.py/lib/python3.5/site-packages/javabridge/_, 2): Symbol not found: _kCFAllocatorDefault Import javabridge._javabridge as _javabridge jutil import start_vm, kill_vm, vm, activate_awt, deactivate_awtįile "/Users/yifeiluo/.conda/envs/prac2_sample_code.py/lib/python3.5/site-packages/javabridge/jutil.py", line 157, in `/Users/yifeiluo/.conda/envs/prac2_sample_code.py/bin/python /Users/yifeiluo/Documents/Curtin/Y1S2/COMP5009/w3/lab/demo/prac2_sample_code.pyįile "/Users/yifeiluo/Documents/Curtin/Y1S2/COMP5009/w3/lab/demo/prac2_sample_code.py", line 23, inįile "/Users/yifeiluo/.conda/envs/prac2_sample_code.py/lib/python3.5/site-packages/weka/core/jvm.py", line 17, inįile "/Users/yifeiluo/.conda/envs/prac2_sample_code.py/lib/python3.5/site-packages/javabridge/ init.py", line 38, inįrom. I switch back to Anaconda with python 3.5, and errors are different. usr/local/bin/python3.4 /Users/yifeiluo/Documents/Curtin/Y1S2/COMP5009/w3/lab/demo/demo.py DEBUG::Adding bundled jars DEBUG::Classpath= DEBUG::MaxHeapSize=default DEBUG::Package support disabled DEBUG:javabridge.jutil:Creating JVM object DEBUG:javabridge.jutil:Launching VM in non-python thread DEBUG:javabridge.jutil:Attaching to VM in monitor thread DEBUG:javabridge.jutil:Signalling caller Exception in thread "Thread-1" Failed to get class Lweka/core/WekaPackageManager : Lweka/core/WekaPackageManager Caused by: : at (URLClassLoader.java:381) at (ClassLoader.java:424) at $AppClassLoader.loadClass(Launcher.java:331) at (ClassLoader.java:357) Traceback (most recent call last): File "/Users/yifeiluo/Documents/Curtin/Y1S2/COMP5009/w3/lab/demo/demo.py", line 13, in jvm.start() File "/Library/Frameworks/amework/Versions/3.4/lib/python3.4/site-packages/weka/core/jvm.py", line 122, in start False) File "/Library/Frameworks/amework/Versions/3.4/lib/python3.4/site-packages/javabridge/jutil.py", line 934, in static_call fn = make_static_call(class_name, method_name, sig) File "/Library/Frameworks/amework/Versions/3.4/lib/python3.4/site-packages/javabridge/jutil.py", line 908, in make_static_call raise JavaException(jexception) : Lweka/core/WekaPackageManager When I try these on Pycharm after installing python-weka-wrapper3 on it, there are some errors. I put these codes on Spyder, and works well. From weka.experiments import ResultMatrix, Testerĭata_file = "kddcup.data_10_percent_corrected_10000_samples.arff"
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
February 2023
Categories |