[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

jupyter-notebook and bullseye



I don't use jupyter-notebook often, so I only just discovered that I am encountering a problem with it following my upgrade from buster to bullseye a couple of months ago. It worked fine on buster, and I have changed nothing related to jupyter since the upgrade.

When jupyter-notebook starts the browser, I see a big red "kernel error" button, and when I press it, the following pops up:

----

Traceback (most recent call last):
   File "/usr/lib/python3/dist-packages/tornado/web.py", line 1704, in _execute
     result = await result
   File "/usr/lib/python3/dist-packages/tornado/gen.py", line 769, in run
     yielded = self.gen.throw(*exc_info)  # type: ignore
File "/usr/lib/python3/dist-packages/notebook/services/sessions/handlers.py", line 69, in post
     model = yield maybe_future(
   File "/usr/lib/python3/dist-packages/tornado/gen.py", line 762, in run
     value = future.result()
   File "/usr/lib/python3/dist-packages/tornado/gen.py", line 769, in run
     yielded = self.gen.throw(*exc_info)  # type: ignore
File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 88, in create_session kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
   File "/usr/lib/python3/dist-packages/tornado/gen.py", line 762, in run
     value = future.result()
   File "/usr/lib/python3/dist-packages/tornado/gen.py", line 769, in run
     yielded = self.gen.throw(*exc_info)  # type: ignore
File "/usr/lib/python3/dist-packages/notebook/services/sessions/sessionmanager.py", line 100, in start_kernel_for_session
     kernel_id = yield maybe_future(
   File "/usr/lib/python3/dist-packages/tornado/gen.py", line 762, in run
     value = future.result()
File "/usr/lib/python3/dist-packages/notebook/services/kernels/kernelmanager.py", line 176, in start_kernel kernel_id = await maybe_future(self.pinned_superclass.start_kernel(self, **kwargs)) File "/usr/lib/python3/dist-packages/jupyter_client/multikernelmanager.py", line 185, in start_kernel
     km.start_kernel(**kwargs)
File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 313, in start_kernel
     self.kernel = self._launch_kernel(kernel_cmd, **kw)
File "/usr/lib/python3/dist-packages/jupyter_client/manager.py", line 222, in _launch_kernel
     return launch_kernel(kernel_cmd, **kw)
File "/usr/lib/python3/dist-packages/jupyter_client/launcher.py", line 134, in launch_kernel
     proc = Popen(cmd, **kwargs)
   File "/usr/lib/python3.9/subprocess.py", line 951, in __init__
     self._execute_child(args, executable, preexec_fn, close_fds,
   File "/usr/lib/python3.9/subprocess.py", line 1823, in _execute_child
     raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/python'

-----

It is certainly true that that file does not exist, but something is obviously telling jupyter to look for it. So something about the jupyter configuration seems to have been hosed by the upgrade.

The command "jupyter kernelspec list" produces:

----

[ZB:~] jupyter kernelspec list
-bash: /home/n7dr/.local/bin/jupyter: /usr/bin/python: bad interpreter: No such file or directory
[ZB:~]

----

In buster I had perhaps half a dozen kernels available (and they all worked).

Can someone suggest how I might get back to the fully-working set of kernels that I had in buster?

  Doc

--
Web:  http://enginehousebooks.com/drevans



Reply to: