Open mogthesprog opened 8 years ago
Update:
I played around with the version of notebok and downgraded to version 4.2.0:
pip3 uninstall jupyter
pip2 install notebook==4.2.0
And then I noticed the following messages in the log
[D 09:59:04.497 NotebookApp] Initializing websocket connection /api/kernels/10e8c215-4152-48ee-9160-cdedd70b44ff/channels
[D 09:59:04.500 NotebookApp] Requesting kernel info from 10e8c215-4152-48ee-9160-cdedd70b44ff
[D 09:59:04.500 NotebookApp] Connecting to: tcp://127.0.0.1:50264
/usr/bin/python: No module named shutil_get_terminal_size; 'ipykernel' is a package and cannot be directly executed
[I 09:59:07.470 NotebookApp] KernelRestarter: restarting kernel (1/5)
[D 09:59:07.471 NotebookApp] Starting kernel: [u'/usr/bin/python', u'-m', u'ipykernel', u'-f', u'/root/.local/share/jupyter/runtime/kernel-10e8c215-4152-48ee-9160-cdedd70b44ff.json']
[D 09:59:07.477 NotebookApp] Connecting to: tcp://127.0.0.1:59295
/usr/bin/python: No module named shutil_get_terminal_size; 'ipykernel' is a package and cannot be directly executed
[I 09:59:10.480 NotebookApp] KernelRestarter: restarting kernel (2/5)
[D 09:59:10.481 NotebookApp] Starting kernel: [u'/usr/bin/python', u'-m', u'ipykernel', u'-f', u'/root/.local/share/jupyter/runtime/kernel-10e8c215-4152-48ee-9160-cdedd70b44ff.json']
[D 09:59:10.484 NotebookApp] Connecting to: tcp://127.0.0.1:59295
/usr/bin/python: No module named shutil_get_terminal_size; 'ipykernel' is a package and cannot be directly executed
[I 09:59:13.486 NotebookApp] KernelRestarter: restarting kernel (3/5)
[D 09:59:13.487 NotebookApp] Starting kernel: [u'/usr/bin/python', u'-m', u'ipykernel', u'-f', u'/root/.local/share/jupyter/runtime/kernel-10e8c215-4152-48ee-9160-cdedd70b44ff.json']
[D 09:59:13.490 NotebookApp] Connecting to: tcp://127.0.0.1:59295
/usr/bin/python: No module named shutil_get_terminal_size; 'ipykernel' is a package and cannot be directly executed
[W 09:59:14.501 NotebookApp] Timeout waiting for kernel_info reply from 10e8c215-4152-48ee-9160-cdedd70b44ff
[D 09:59:14.502 NotebookApp] Opening websocket /api/kernels/10e8c215-4152-48ee-9160-cdedd70b44ff/channels
[D 09:59:14.502 NotebookApp] Connecting to: tcp://127.0.0.1:50264
[D 09:59:14.503 NotebookApp] Connecting to: tcp://127.0.0.1:51216
[D 09:59:14.503 NotebookApp] Connecting to: tcp://127.0.0.1:48014
[I 09:59:16.491 NotebookApp] KernelRestarter: restarting kernel (4/5)
WARNING:root:kernel 10e8c215-4152-48ee-9160-cdedd70b44ff restarted
[D 09:59:16.492 NotebookApp] Starting kernel: [u'/usr/bin/python', u'-m', u'ipykernel', u'-f', u'/root/.local/share/jupyter/runtime/kernel-10e8c215-4152-48ee-9160-cdedd70b44ff.json']
[D 09:59:16.495 NotebookApp] Connecting to: tcp://127.0.0.1:59295
/usr/bin/python: No module named shutil_get_terminal_size; 'ipykernel' is a package and cannot be directly executed
Pay special attention to this line:
/usr/bin/python: No module named shutil_get_terminal_size; 'ipykernel' is a package and cannot be directly executed
This error message isn't appearing in version 4.2.2
, at least not for me. We had this problem before and fixed it with something like this:
RUN /usr/bin/yes | pip2 uninstall backports.shutil_get_terminal_size && \
pip install backports.shutil_get_terminal_size
I'm not sure what the issue is here, whether it's a problem with python2/3. Hopefully this helps someone else :)
Cheers.
RUN /usr/bin/yes | pip2 uninstall backports.shutil_get_terminal_size && \ pip install backports.shutil_get_terminal_size
I'm not sure which Python your pip
here uses, but you need to make sure that module is correctly installed for Python 2. It's not needed under Python 3.
Hey Guys,
Seeing some strange behaviour in the notebook and I have no idea where to begin troubleshooting it. Note that notebooks aren't working, while the terminal is working fine with no issues, so i think that rules out any websocket issues.
I installed the notebook with:
And then I'm running the notebook with something like the following:
Here is the output in the logs when i try to run a python kernel.
Since it's struggling to connect via tcp I also tried
--transport='ipc'
with no dice... Any ideas?