octave_kernel icon indicating copy to clipboard operation
octave_kernel copied to clipboard

kernel status stuck on "connecting" or "unknown"

Open goyalyashpal opened this issue 2 years ago • 3 comments

Summary

  • the kernel status in the jupyter lab is stuck on connecting, and after some time, it converts to "unknown" (screenshot attached)
  • for records, the status of the working kernel is mostly "idle"

Details:

  • installation: mentioned in the command used section below
  • server launch: by launching a shortcut to jupyter-server
  • frontend launch: by shortcut of the tab of jupyter lab (i.e. essentially that address of "local:// ..." )
    so, now it opens in its own window. i guess it's called Web App format
  • the octave kernel is shown fine in the jupyter lab's launcher (screenshot attached)
  • but i am facing the above mentioned problem

Commands Used or Terminal Output

  • For installation:
pip install jupyter
pip install jupyterlab
pip install octave-kernel
$ python -m octave-kernel.check
C:\Users\...\AppData\Local\Programs\Python\Python310\python.exe: 
Error while finding module specification for 'octave-kernel.check' (ModuleNotFoundError: No module named 'octave-kernel')

$ jupyter kernelspec list
Available kernels:
  julia-1.7    C:\Users\...\AppData\Roaming\jupyter\kernels\julia-1.7
  octave       C:\Users\...\AppData\Local\Programs\Python\Python310\share\jupyter\kernels\octave
  python3      C:\Users\...\AppData\Local\Programs\Python\Python310\share\jupyter\kernels\python3
  • as can be seen, it is available in the jupyter kernelspec list but not in the python -m octave-kernel.check

  • per the readme instructions & https://github.com/Calysto/octave_kernel/issues/182#issuecomment-754101917 https://github.com/Calysto/octave_kernel/blob/40b9d13dbc35c6c03f3ed8de4d2458180b9c722e/README.rst?plain=1#L91-L93 https://github.com/Calysto/octave_kernel/blob/40b9d13dbc35c6c03f3ed8de4d2458180b9c722e/README.rst?plain=1#L30

Screenshots

image

Environment:

  • OS: WIndows 10 20H2
  • Octave: 7.1.0 "x86_64-w64-mingw32"
  • pip: 22.2
$ jupyter --version
ipykernel        : 6.15.1
ipywidgets       : 7.7.1
jupyter_client   : 7.3.4
jupyter_core     : 4.11.1
jupyter_server   : 1.18.1
jupyterlab       : 3.4.4

goyalyashpal avatar Jul 27 '22 14:07 goyalyashpal

I'm having the exact same issue, by any chance have you figured out a solution?

gxr1894 avatar Aug 23 '22 20:08 gxr1894

hi,

nope. i haven't.


aside:

i figured that for whatever reasons,

  • having the octave kernel installed &,
  • i guess running in the background,
  • and i dont remember if running a file with it was necessary to face this bug or not, &
  • running the jupyter-kernel (i.e. whether jupyter-notebook, or jupyter-lab or anything else "jupyter")

... caused the jupyter to extremely slow down which i couldnt bear. so i uninstalled the octave kernel.

gxr1894 wrote:

I'm having the exact same issue, by any chance have you figured out a solution?

goyalyashpal avatar Aug 24 '22 01:08 goyalyashpal

I had the same problem. I normally use linux and it worked easily there. Windows is strange to me. You need to add the octave command line interface executable to your path or define the OCTAVE_EXECUTABLE variable. I found it easier to add the environment variable - at the search bar in windows I typed "environment variable" and then select "edit environment variables for your account". add New variable. Call it "OCTAVE_EXECUTABLE" and in the variable value field hit browse file and find the file - this was the hard part it was in "C"\Users\MYNAME\AppData\Local\Programs\GNU Octave\Octave-7.2.0\mingw64\bin\octave-cli.exe". Strange location. (no idea what mingw is ?). Anyway, after that it worked no problem.

skotssd avatar Aug 30 '22 17:08 skotssd

You need to add the octave command line interface executable to your path or define the OCTAVE_EXECUTABLE variable. in "C:\Users\MYNAME\AppData\Local\Programs\GNU Octave\Octave-7.2.0\mingw64\bin\octave-cli.exe"

Thanks a lot! It worked. and we have new logo for octave kernal. a bit refreshing :)

Screenshots of working

» "Strange location. (no idea what mingw is ?)."

As i observed:

  • these applications installed on windows mimick the linux directory structure in windows
  • that's why all those folders
  • bin as you would be knowing already, is for binary files
  • mingw is abbreviation of minimalistic GNU (or GCC?) for Windows - which iiuc, is a minimalistic distribution of gcc (gnu compiler collection) for windows
  • w64 means it's for 64bit, yes, it's full name becomes mingw-w64 - i don't know what the second w means 😅 2023-02-04 Edit: w might mean word length

Have understood the blame feature for the first time now:

  • https://github.com/Calysto/octave_kernel/blob/efbf53a4f1b5b4a30fba0dc6ac211d75a2e23368/README.rst?plain=1#L24-L27
  • <-- https://github.com/Calysto/octave_kernel/commit/efbf53a4f1b5b4a30fba0dc6ac211d75a2e23368
  • <-- https://github.com/Calysto/octave_kernel/blame/main/README.rst#L26

goyalyashpal avatar Dec 18 '22 10:12 goyalyashpal

@skotssd I have incorporated your wordings for improving the readme further in https://github.com/Calysto/octave_kernel/commit/31238ac690c35eb8b9b14a8329348c63ae1c2688 via #229

goyalyashpal avatar Dec 19 '22 15:12 goyalyashpal

any one has any idea how to set variable in mac?

Poojan1015 avatar Feb 04 '23 17:02 Poojan1015

any one has any idea how to set variable in mac?

@Poojan1015 ain't a mac user, but following are some articles which may help u :smiley:

  • Use environment variables in Terminal on Mac https://support.apple.com/en-gb/guide/terminal/apd382cc5fa-4f58-4449-b20a-41c53c006f8f/mac
  • How to Set Environment Variables in MacOS https://phoenixnap.com/kb/set-environment-variable-mac
  • ddg 🔍 : environment variable on mac

goyalyashpal avatar Feb 04 '23 18:02 goyalyashpal