Home > other >  OSError: [126] WinError JVM DLL not found
OSError: [126] WinError JVM DLL not found

Time:09-24

Hanlp installation after the completion of the question of whether the test after the success of the installation

(base) C: \ Users \ HP> Hanlp segment
Traceback (the most recent call last) :
The File "d: \ \ lib \ runpy 1 p y", line 193, in _run_module_as_main
"__main__", mod_spec)
The File "d: \ \ lib \ runpy 1 p y", line 85, in _run_code
The exec (code, run_globals)
The File "D: \ \ Scripts \ hanlp 1 exe \ __main__ py", line 5, in & lt; module>
1 File "d: \ \ lib \ site - packages \ pyhanlp \ set py", line 145, in & lt; module>
_start_jvm_for_hanlp ()
1 File "d: \ \ lib \ site - packages \ pyhanlp \ set py", line 133, in _start_jvm_for_hanlp
HANLP_JVM_XMX, convertStrings=True)
The File "d: \ \ lib \ site - packages \ jpype \ _core py", line 219, in startJVM
_jpype. Startup (jvmpath, tuple (args), ignoreUnrecognized, convertStrings)
OSError: [126] WinError JVM DLL not found: D: \ \ Program Files \ Java \ jre \ bin \ server \ JVM DLL
At Win32PlatformAdapter: : loadLibrary (F: \ nelson85pl \ nelson85 \ devel \ open \ jpype \ native \ common \ include \ jp_platform_win32 h: 57)
The at JPEnv: : loadJVM (native \ common \ jp_env CPP: 179)
The at PyJPModule: : startup (native \ python \ pyjp_module CPP: 159)

CodePudding user response:

This is because in the right environment variables, you need change the absolute path, reference, this article https://blog.csdn.net/jianchi1117/article/details/105542547
  • Related