Calysto / octave_kernel

An Octave kernel for IPython
BSD 3-Clause "New" or "Revised" License
447 stars 65 forks source link

Issue starting Kernel again #152

Open lux12337 opened 5 years ago

lux12337 commented 5 years ago

Hi, I was just able to resolve a similar issue with the kernel not loading on a 'the littlest jupyterhub' deployment, but once i tried to follow similar steps on a 'jupyterhub-deploy-teaching' deployment, the kernel still hangs when loading a notebook. I have installed the octave_kernel using conda-forge and also made sure to install octave itself with conda. I ran the command python -m octave_kernel.check with results: image Also tried python -c "from octave_kernel.kernel import OctaveEngine; print(OctaveEngine().eval('ones(3)'))" with output: image Again, thank you for all the help in advance.

blink1073 commented 5 years ago

Please run pip install -U metakernel to pick up the most recent metakernel. I'll update the conda-forge recipe.

blink1073 commented 5 years ago

cf https://github.com/conda-forge/octave_kernel-feedstock/pull/30

lux12337 commented 5 years ago

Hi @blink1073, thank you for the reply. I run pip install -U metakernel command and got these new messages: image

The other command: luxchen@local:~$ python -c "from octave_kernel.kernel import OctaveEngine; print(OctaveEngine().eval('ones(3)'))" /opt/conda/lib/python3.6/site-packages/metakernel/_metakernel.py:21: VisibleDeprecationWarning: zmq.eventloop.minitornado is deprecated in pyzmq 14.0 and will be removed. Install tornado itself to use zmq with the tornado IOLoop.

from ipykernel.kernelapp import IPKernelApp Traceback (most recent call last): File "/opt/conda/lib/python3.6/site-packages/pexpect/expect.py", line 111, in expect_loop incoming = spawn.read_nonblocking(spawn.maxread, timeout) File "/opt/conda/lib/python3.6/site-packages/pexpect/pty_spawn.py", line 509, in read_nonblocking raise TIMEOUT('Timeout exceeded.') pexpect.exceptions.TIMEOUT: Timeout exceeded. During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 1, in File "/opt/conda/lib/python3.6/site-packages/octave_kernel/kernel.py", line 162, in init self.repl = self._create_repl() File "/opt/conda/lib/python3.6/site-packages/octave_kernel/kernel.py", line 372, in _create_repl force_prompt_on_continuation=True) File "/opt/conda/lib/python3.6/site-packages/metakernel/replwrap.py", line 97, in init continuation_prompt_regex)) File "/opt/conda/lib/python3.6/site-packages/metakernel/replwrap.py", line 118, in set_prompt self.child.expect(promptregex) File "/opt/conda/lib/python3.6/site-packages/pexpect/spawnbase.py", line 341, in expect timeout, searchwindowsize, async) File "/opt/conda/lib/python3.6/site-packages/pexpect/spawnbase.py", line 369, in expect_list return exp.expect_loop(timeout) File "/opt/conda/lib/python3.6/site-packages/pexpect/expect.py", line 119, in expect_loop return self.timeout(e) File "/opt/conda/lib/python3.6/site-packages/pexpect/expect.py", line 82, in timeout raise TIMEOUT(msg) pexpect.exceptions.TIMEOUT: Timeout exceeded. <pexpect.pty_spawn.spawn object at 0x7fc3c6a34b38> command: /opt/conda/bin/octave-cli args: [b'/opt/conda/bin/octave-cli', b'--interactive', b'--quiet', b'--no-init-file'] buffer (last 100 chars): ''

after: <class 'pexpect.exceptions.TIMEOUT'> match: None match_index: None exitstatus: None flag_eof: False pid: 25299 child_fd: 7 closed: False timeout: 30 delimiter: <class 'pexpect.exceptions.EOF'> logfile: None logfile_read: None logfile_send: None maxread: 2000 ignorecase: False searchwindowsize: None delaybeforesend: 0.05 delayafterclose: 0.1 delayafterterminate: 0.1 searcher: searcher_re: 0: re.compile('octave.*>')

blink1073 commented 5 years ago

What does the prompt look like when you launch octave-cli directly from the terminal?

lux12337 commented 5 years ago

This is the output I get: image

blink1073 commented 5 years ago

Hmm, it looks like something is wrong with the install. We need to use the cli app in order to communicate properly. Are you able to reinstall octave and try octave-cli again? If you got it from conda-forge, you might try from another source. I was getting segfaults from the conda-forge version.