My jupyter notebook julia Kernel suddenly started to present error

Viewed 48

My julia notebooks were working fine but today this "kernel error" appeared and I don't know how to deal with this:

    Traceback (most recent call last):
  File "/home/antonio/anaconda3/lib/python3.9/site-packages/tornado/web.py", line 1704, in _execute
    result = await result
  File "/home/antonio/anaconda3/lib/python3.9/site-packages/tornado/gen.py", line 769, in run
    yielded = self.gen.throw(*exc_info)  # type: ignore
  File "/home/antonio/anaconda3/lib/python3.9/site-packages/notebook/services/sessions/handlers.py", line 74, in post
    model = yield maybe_future(
  File "/home/antonio/anaconda3/lib/python3.9/site-packages/tornado/gen.py", line 762, in run
    value = future.result()
  File "/home/antonio/anaconda3/lib/python3.9/site-packages/tornado/gen.py", line 769, in run
    yielded = self.gen.throw(*exc_info)  # type: ignore
  File "/home/antonio/anaconda3/lib/python3.9/site-packages/notebook/services/sessions/sessionmanager.py", line 98, in create_session
    kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
  File "/home/antonio/anaconda3/lib/python3.9/site-packages/tornado/gen.py", line 762, in run
    value = future.result()
  File "/home/antonio/anaconda3/lib/python3.9/site-packages/tornado/gen.py", line 769, in run
    yielded = self.gen.throw(*exc_info)  # type: ignore
  File "/home/antonio/anaconda3/lib/python3.9/site-packages/notebook/services/sessions/sessionmanager.py", line 110, in start_kernel_for_session
    kernel_id = yield maybe_future(
  File "/home/antonio/anaconda3/lib/python3.9/site-packages/tornado/gen.py", line 762, in run
    value = future.result()
  File "/home/antonio/anaconda3/lib/python3.9/site-packages/notebook/services/kernels/kernelmanager.py", line 176, in start_kernel
    kernel_id = await maybe_future(self.pinned_superclass.start_kernel(self, **kwargs))
  File "/home/antonio/anaconda3/lib/python3.9/site-packages/jupyter_client/multikernelmanager.py", line 186, in start_kernel
    km.start_kernel(**kwargs)
  File "/home/antonio/anaconda3/lib/python3.9/site-packages/jupyter_client/manager.py", line 341, in start_kernel
    self.kernel = self._launch_kernel(kernel_cmd, **kw)
  File "/home/antonio/anaconda3/lib/python3.9/site-packages/jupyter_client/manager.py", line 249, in _launch_kernel
    return launch_kernel(kernel_cmd, **kw)
  File "/home/antonio/anaconda3/lib/python3.9/site-packages/jupyter_client/launcher.py", line 132, in launch_kernel
    proc = Popen(cmd, **kwargs)
  File "/home/antonio/anaconda3/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/home/antonio/anaconda3/lib/python3.9/subprocess.py", line 1821, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/snap/julia/13/bin/julia'

I tried to uninstall and install again both julia and IJulia but it didn't worked. I use linux Mint latest version.

2 Answers

It seems that your kernel points to a inexisting julia No such file or directory: '/snap/julia/13/bin/julia'

How did you installed Julia ? I do not know very well snap, but it a tools to install some applications.

If you have a console you could list the kernels by

jupyter kernelspec list                                                  
Available kernels:

julia-1.8    /home/user/.local/share/jupyter/kernels/julia-1.8
python3.9    /home/user/.local/share/jupyter/kernels/python3.9
python3      /usr/share/jupyter/kernels/python3
sagemath     /usr/share/jupyter/kernels/sagemath

you could look at the file for example '/home/user/.local/share/jupyter/kernels/julia-1.8/kernel.json' inside you have information about the interpretor

 {
  "display_name": "Julia 1.8.1",
  "argv": [
  "/usr/bin/julia",
  "-i",
  "--color=yes",
  "--project=@.",
  "/home/user/.julia/packages/IJulia/someHASHNUMBER/src/kernel.jl",
  "{connection_file}"
  ],
  "language": "julia",
  "env": {},
  "interrupt_mode": "signal"
 }

here you could see that the interpretor is /usr/bin/julia. Try to modify it, to points towards a good julia executable.

Last point : to install IJulia, you use Pkg.add("IJulia") inside the REPL or it is your distro installator ?

You can try by updating all the packages by typing "conda update --all". One of the updates could possibly be the "tornado" package.

Related