Clay
Clay

Reputation: 2736

Jupyter Octave Kernel on Windows7

Followed the instructions at https://github.com/Calysto/octave_kernel to install octave_kernel on a Windows1 machine and everything went ok. However, when I select Octave as my kernal from Jupyter, the following occurs.

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.

I also cannot get oct2py to work.

The Jupyter console output from the octave_kernal attempt follows.

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

I saw the permission error and tried to run Jupyter as an administrator to no avail.

Upvotes: 0

Views: 1509

Answers (1)

SACn
SACn

Reputation: 1924

Set enviornment variale OCTAVE_EXECUTABLE as C:\Octave\Octave-4.2.1\bin\octave-cli-4.2.1.exe. Provide full R/W permission to user Everyone on Octave install folder

Upvotes: 0

Related Questions