[Python-modules-team] Bug#913110: jupyter-notebook: ipython3 kernel dies when creating python3 notebook
D. R. Evans
doc.evans at gmail.com
Wed Nov 7 03:16:54 GMT 2018
Package: jupyter-notebook
Version: 4.2.3-4
Severity: important
Dear Maintainer,
* What led up to the situation?
1. Installed jupyter-notebook.
2. Ran jupyter-notebook.
3. Tried to create Python3 notebook.
* What exactly did you do (or not do) that was effective (or
ineffective)?
Selected "New". The only available option on a clean install of jupyter-
notebook is Python3 (which is as expected).
So I selected "New" to create a new python3 notebook.
* What was the outcome of this action?
The ipython3 kernel dies (consistently, 100% of the time).
* What outcome did you expect instead?
I expected the notebook to be created.
The fix is described below.
----
The output on the console is:
HN:~] jupyter-notebook
[I 07:37:19.123 NotebookApp] Serving notebooks from local directory: /home/n7dr
[I 07:37:19.124 NotebookApp] 0 active kernels
[I 07:37:19.124 NotebookApp] The Jupyter Notebook is running at:
http://localhost:8888/
[I 07:37:19.124 NotebookApp] Use Control-C to stop this server and shut down
all kernels (twice to skip confirmation).
[I 07:37:29.629 NotebookApp] Creating new notebook in
[I 07:37:32.575 NotebookApp] Kernel started:
00f6d461-87f1-410e-9963-5f5db91602f3
/usr/bin/python: No module named ipykernel_launcher
[I 07:37:35.561 NotebookApp] KernelRestarter: restarting kernel (1/5)
/usr/bin/python: No module named ipykernel_launcher
[I 07:37:38.571 NotebookApp] KernelRestarter: restarting kernel (2/5)
/usr/bin/python: No module named ipykernel_launcher
[I 07:37:41.582 NotebookApp] KernelRestarter: restarting kernel (3/5)
/usr/bin/python: No module named ipykernel_launcher
[W 07:37:42.678 NotebookApp] Timeout waiting for kernel_info reply from
00f6d461-87f1-410e-9963-5f5db91602f3
[I 07:37:44.592 NotebookApp] KernelRestarter: restarting kernel (4/5)
WARNING:root:kernel 00f6d461-87f1-410e-9963-5f5db91602f3 restarted
/usr/bin/python: No module named ipykernel_launcher
[W 07:37:47.604 NotebookApp] KernelRestarter: restart failed
[W 07:37:47.605 NotebookApp] Kernel 00f6d461-87f1-410e-9963-5f5db91602f3 died,
removing from map.
ERROR:root:kernel 00f6d461-87f1-410e-9963-5f5db91602f3 restarted failed!
[W 07:37:47.654 NotebookApp] Kernel deleted before session
[W 07:37:47.656 NotebookApp] 410 DELETE
/api/sessions/56ef952c-800c-448f-baf0-857081b87abc (::1) 3.46ms
referer=http://localhost:8888/notebooks/Untitled4.ipynb?kernel_name=python3
The source of the problem appears to be at this line:
/usr/bin/python: No module named ipykernel_launcher
/usr/bin/python is a symlink to python2 NOT python3
So it seems wrong thet jupyter-notebook is calling /usr/bin/python when trying
to create a Python3 notebook.
So the fix is:
in .local/jupyter/kernels/python3/kernel.json, the first few lines as installed
by the package read:
{
"argv": [
"python",
the third line should be changed to:
"python3",
After making this change, the jupyter-notebook application correctly creates a
Python3 notebook, as expected.
-- System Information:
Debian Release: 9.5
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.9.0-8-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE= (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages jupyter-notebook depends on:
ii python3 3.5.3-1
ii python3-notebook 4.2.3-4
jupyter-notebook recommends no packages.
jupyter-notebook suggests no packages.
-- no debconf information
More information about the Python-modules-team
mailing list