按照https://github.com/Calysto/octave_kernel上的說明在Windows1計算機上安裝octave_kernel,一切正常。但是,當我從Jupyter選擇Octave作爲我的內核時,會發生以下情況。Windows 7上的Jupyter Octave內核
The kernel has died, and the automatic restart has failed. It is possible the kernel cannot be restarted. If you are not able to restart the kernel, you will still be able to save the notebook, but running code will no longer work until the notebook is reopened.
我也無法使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無濟於事。
你能在命令提示符下運行「octave」還是「octave-cli」? –
嗨托馬斯,是的。 Windows在找到Octave時沒有問題,無論是直接從運行還是從任何目錄中的PowerShell或cmd。 我有兩個Octave和Jupyter直接安裝在C:\,我想知道如果這是問題,即使我有管理員權限。 – Clay
我還試圖在管理員模式下一個Python控制檯以下: '進口子,OS 可執行= os.environ [ 'OCTAVE_EXECUTABLE'] subprocess.check_output([可執行, '--version'])' 相同錯誤: 'PermissionError:[WinError 5] Access denied' – Clay