Я попытался установить и использовать библиотеку pypmml для открытия и оценки файла pmml. Я использую блокнот jupyter на Windows. Когда я запускаю этот код - model = Model.load('single_iris_dectree.xml')
, я получаю ошибку ниже. Но если я попытаюсь запустить его на Ma c, он будет работать абсолютно нормально. Есть ли другой способ загрузить и оценить файл pmml?
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
<ipython-input-11-00bc89b72cd3> in <module>
----> 1 a = Model.load(p)
C:\ProgramData\Anaconda3\lib\site-packages\pypmml\model.py in load(cls, f)
227 # Check if a file path
228 if os.path.exists(model_content):
--> 229 model = cls.fromFile(model_content)
230 else:
231 model = cls.fromString(model_content)
C:\ProgramData\Anaconda3\lib\site-packages\pypmml\model.py in fromFile(cls, name)
183 def fromFile(cls, name):
184 """Load a model from PMML file with given pathname"""
--> 185 pc = PMMLContext.getOrCreate()
186 try:
187 java_model = pc._jvm.org.pmml4s.model.Model.fromFile(name)
........
C:\ProgramData\Anaconda3\lib\site-packages\py4j\java_gateway.py in launch_gateway(port, jarpath, classpath, javaopts, die_on_exit, redirect_stdout, redirect_stderr, daemonize_redirect, java_path, create_new_process_group, enable_auth, cwd, return_proc)
326
327 proc = Popen(command, stdout=PIPE, stdin=PIPE, stderr=stderr,
--> 328 cwd=kwargs.get('cwd',None), **popen_kwargs)
329
330 # Determine which port the server started on (needed to support
C:\ProgramData\Anaconda3\lib\subprocess.py in __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, encoding, errors, text)
798 c2pread, c2pwrite,
799 errread, errwrite,
--> 800 restore_signals, start_new_session)
801 except:
802 # Cleanup if the child failed starting.
C:\ProgramData\Anaconda3\lib\subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_start_new_session)
1205 env,
1206 os.fspath(cwd) if cwd is not None else None,
-> 1207 startupinfo)
1208 finally:
1209 # Child is launched. Close the parent's copy of those pipe
FileNotFoundError: [WinError 2] The system cannot find the file specified