按照https://github.com/Calysto/octave_kernel的说明在Windows1计算机上安装octave_kernel,一切正常。但是,当我从Jupyter中选择Octave作为我的核心时,会发生以下情况。
内核已经死亡,自动重启失败。它是 可能内核无法重启。如果你不能 重新启动内核,你仍然可以保存笔记本,但是 在重新打开笔记本之前,运行代码将不再有效。
我也无法让oct2py工作。
来自octave_kernal尝试的Jupyter控制台输出如下。
PermissionError: [WinError 5] Access is denied
[I 18:00:38.987 NotebookApp] KernelRestarter: restarting kernel (4/5)
WARNING:root:kernel f15e40d3-8288-4b9b-bb32-dea6b67484e1 restarted
Traceback (most recent call last):
File "C:\Anaconda3\lib\runpy.py", line 170, in _run_module_as_main
"__main__", mod_spec)
File "C:\Anaconda3\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Anaconda3\lib\site-packages\octave_kernel\__main__.py", line 6, in <m
odule>
IPKernelApp.launch_instance(kernel_class=OctaveKernel)
File "C:\Anaconda3\lib\site-packages\traitlets\config\application.py", line 59
5, in launch_instance
app.initialize(argv)
File "<decorator-gen-123>", line 2, in initialize
File "C:\Anaconda3\lib\site-packages\traitlets\config\application.py", line 74
, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Anaconda3\lib\site-packages\ipykernel\kernelapp.py", line 421, in ini
tialize
self.init_kernel()
File "C:\Anaconda3\lib\site-packages\ipykernel\kernelapp.py", line 360, in ini
t_kernel
user_ns=self.user_ns,
File "C:\Anaconda3\lib\site-packages\traitlets\config\configurable.py", line 4
05, in instance
inst = cls(*args, **kwargs)
File "C:\Anaconda3\lib\site-packages\metakernel\process_metakernel.py", line 5
3, in __init__
self._start()
File "C:\Anaconda3\lib\site-packages\metakernel\process_metakernel.py", line 5
8, in _start
self.wrapper = self.makeWrapper()
File "C:\Anaconda3\lib\site-packages\octave_kernel\kernel.py", line 82, in mak
eWrapper
if 'version 4' in self.banner:
File "C:\Anaconda3\lib\site-packages\octave_kernel\kernel.py", line 63, in ban
ner
banner = subprocess.check_output([self.executable, '--version'])
File "C:\Anaconda3\lib\subprocess.py", line 629, in check_output
**kwargs).stdout
File "C:\Anaconda3\lib\subprocess.py", line 696, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Anaconda3\lib\subprocess.py", line 950, in __init__
restore_signals, start_new_session)
File "C:\Anaconda3\lib\subprocess.py", line 1220, in _execute_child
startupinfo)
PermissionError: [WinError 5] Access is denied
[W 18:00:42.002 NotebookApp] KernelRestarter: restart failed
[W 18:00:42.002 NotebookApp] Kernel f15e40d3-8288-4b9b-bb32-dea6b67484e1 died, r
emoving from map.
ERROR:root:kernel f15e40d3-8288-4b9b-bb32-dea6b67484e1 restarted failed!
[W 18:00:42.002 NotebookApp] Kernel deleted before session
[W 18:00:42.002 NotebookApp] 410 DELETE /api/sessions/d25e7956-2a56-4977-a2de-8b
9c3f828a05 (::1) 0.00ms referer=http://localhost:8888/notebooks/Untitled6.ipynb?
kernel_name=octave
我看到了权限错误并尝试以管理员身份运行Jupyter无济于事。
答案 0 :(得分:0)
将环境变量OCTAVE_EXECUTABLE设置为C:\ Octave \ Octave-4.2.1 \ bin \ octave-cli-4.2.1.exe。为Octave安装文件夹上的所有用户提供完整的R / W权限