Dear all, I cannot run J in a Jupyter notebook. Following the instructions at https://code.jsoftware.com/wiki/Guides/Jupyter, I:
1. downloaded the 64bit compressed tar file for Linux 2. unpacked it under my home directory on a Ubuntu 18 desktop machine 3. cd to the new directory (/home/francesco/JDemo) 4. run the jupyter-notebook.sh script 5. in the freshly opened browser window (http://localhost:8888/tree), selected New->J 6. waited while the kernel was starting and jupyter tried to connect to it 7. give up after jupyter repeatedly failed to connect to the J kernel (see attached stderr output). The error about the NaCl helper process at line 10 shows up also in another installation of jupyter, on the same machine, where both python and sagemath run fine. Hence, I believe it should be the reason for the failure. Error on line 19 looks more promising, but I am not sure how to interpret it - even less how to fix it. Any hint? Thanks in advance, Francesco
[I 19:02:34.506 NotebookApp] Serving notebooks from local directory: /home/francesco/JDemo [I 19:02:34.506 NotebookApp] 0 active kernels [I 19:02:34.506 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/?token=3755eafabab64f3cd508b25bb7136de161728d240ba5757f [I 19:02:34.506 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 19:02:34.510 NotebookApp] Copy/paste this URL into your browser when you connect for the first time, to login with a token: http://localhost:8888/?token=3755eafabab64f3cd508b25bb7136de161728d240ba5757f [0822/190234.863787:ERROR:nacl_helper_linux.cc(308)] NaCl helper process running without a sandbox! Most likely you need to configure your SUID sandbox correctly [I 19:02:34.883 NotebookApp] Accepting one-time-token-authenticated connection from 127.0.0.1 [I 19:02:44.107 NotebookApp] Creating new notebook in [I 19:02:44.641 NotebookApp] Kernel started: 3bc915f0-472e-44a7-bc5a-66c909a21fad [W 19:02:44.694 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20200822190234 (127.0.0.1) 26.63ms referer=http://localhost:8888/notebooks/Untitled4.ipynb?kernel_name=jkernel Traceback (most recent call last): File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/application/current.py", line 6, in <module> from contextvars import ContextVar ModuleNotFoundError: No module named 'contextvars' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/francesco/JDemo/Python3/lib/python3.6/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/home/francesco/JDemo/Python3/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/francesco/JDemo/Python3/lib/python3.6/site-packages/jkernel/jkernel.py", line 26, in <module> from ipykernel.kernelbase import Kernel File "/home/francesco/.local/lib/python3.6/site-packages/ipykernel/__init__.py", line 2, in <module> from .connect import * File "/home/francesco/.local/lib/python3.6/site-packages/ipykernel/connect.py", line 13, in <module> from IPython.core.profiledir import ProfileDir File "/home/francesco/.local/lib/python3.6/site-packages/IPython/__init__.py", line 56, in <module> from .terminal.embed import embed File "/home/francesco/.local/lib/python3.6/site-packages/IPython/terminal/embed.py", line 16, in <module> from IPython.terminal.interactiveshell import TerminalInteractiveShell File "/home/francesco/.local/lib/python3.6/site-packages/IPython/terminal/interactiveshell.py", line 19, in <module> from prompt_toolkit.enums import DEFAULT_BUFFER, EditingMode File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/__init__.py", line 16, in <module> from .application import Application File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/application/__init__.py", line 1, in <module> from .application import Application File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/application/application.py", line 39, in <module> from prompt_toolkit.buffer import Buffer File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/buffer.py", line 28, in <module> from .application.current import get_app File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/application/current.py", line 8, in <module> from prompt_toolkit.eventloop.dummy_contextvars import ContextVar # type: ignore File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/eventloop/__init__.py", line 1, in <module> from .async_generator import generator_to_async_generator File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/eventloop/async_generator.py", line 5, in <module> from typing import AsyncGenerator, Callable, Iterable, TypeVar, Union ImportError: cannot import name 'AsyncGenerator' [I 19:02:47.643 NotebookApp] KernelRestarter: restarting kernel (1/5), new random ports Traceback (most recent call last): File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/application/current.py", line 6, in <module> from contextvars import ContextVar ModuleNotFoundError: No module named 'contextvars' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/francesco/JDemo/Python3/lib/python3.6/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/home/francesco/JDemo/Python3/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/francesco/JDemo/Python3/lib/python3.6/site-packages/jkernel/jkernel.py", line 26, in <module> from ipykernel.kernelbase import Kernel File "/home/francesco/.local/lib/python3.6/site-packages/ipykernel/__init__.py", line 2, in <module> from .connect import * File "/home/francesco/.local/lib/python3.6/site-packages/ipykernel/connect.py", line 13, in <module> from IPython.core.profiledir import ProfileDir File "/home/francesco/.local/lib/python3.6/site-packages/IPython/__init__.py", line 56, in <module> from .terminal.embed import embed File "/home/francesco/.local/lib/python3.6/site-packages/IPython/terminal/embed.py", line 16, in <module> from IPython.terminal.interactiveshell import TerminalInteractiveShell File "/home/francesco/.local/lib/python3.6/site-packages/IPython/terminal/interactiveshell.py", line 19, in <module> from prompt_toolkit.enums import DEFAULT_BUFFER, EditingMode File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/__init__.py", line 16, in <module> from .application import Application File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/application/__init__.py", line 1, in <module> from .application import Application File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/application/application.py", line 39, in <module> from prompt_toolkit.buffer import Buffer File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/buffer.py", line 28, in <module> from .application.current import get_app File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/application/current.py", line 8, in <module> from prompt_toolkit.eventloop.dummy_contextvars import ContextVar # type: ignore File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/eventloop/__init__.py", line 1, in <module> from .async_generator import generator_to_async_generator File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/eventloop/async_generator.py", line 5, in <module> from typing import AsyncGenerator, Callable, Iterable, TypeVar, Union ImportError: cannot import name 'AsyncGenerator' [I 19:02:50.658 NotebookApp] KernelRestarter: restarting kernel (2/5), new random ports Traceback (most recent call last): File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/application/current.py", line 6, in <module> from contextvars import ContextVar ModuleNotFoundError: No module named 'contextvars' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/francesco/JDemo/Python3/lib/python3.6/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/home/francesco/JDemo/Python3/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/francesco/JDemo/Python3/lib/python3.6/site-packages/jkernel/jkernel.py", line 26, in <module> from ipykernel.kernelbase import Kernel File "/home/francesco/.local/lib/python3.6/site-packages/ipykernel/__init__.py", line 2, in <module> from .connect import * File "/home/francesco/.local/lib/python3.6/site-packages/ipykernel/connect.py", line 13, in <module> from IPython.core.profiledir import ProfileDir File "/home/francesco/.local/lib/python3.6/site-packages/IPython/__init__.py", line 56, in <module> from .terminal.embed import embed File "/home/francesco/.local/lib/python3.6/site-packages/IPython/terminal/embed.py", line 16, in <module> from IPython.terminal.interactiveshell import TerminalInteractiveShell File "/home/francesco/.local/lib/python3.6/site-packages/IPython/terminal/interactiveshell.py", line 19, in <module> from prompt_toolkit.enums import DEFAULT_BUFFER, EditingMode File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/__init__.py", line 16, in <module> from .application import Application File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/application/__init__.py", line 1, in <module> from .application import Application File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/application/application.py", line 39, in <module> from prompt_toolkit.buffer import Buffer File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/buffer.py", line 28, in <module> from .application.current import get_app File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/application/current.py", line 8, in <module> from prompt_toolkit.eventloop.dummy_contextvars import ContextVar # type: ignore File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/eventloop/__init__.py", line 1, in <module> from .async_generator import generator_to_async_generator File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/eventloop/async_generator.py", line 5, in <module> from typing import AsyncGenerator, Callable, Iterable, TypeVar, Union ImportError: cannot import name 'AsyncGenerator' [I 19:02:53.667 NotebookApp] KernelRestarter: restarting kernel (3/5), new random ports Traceback (most recent call last): File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/application/current.py", line 6, in <module> from contextvars import ContextVar ModuleNotFoundError: No module named 'contextvars' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/francesco/JDemo/Python3/lib/python3.6/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/home/francesco/JDemo/Python3/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/francesco/JDemo/Python3/lib/python3.6/site-packages/jkernel/jkernel.py", line 26, in <module> from ipykernel.kernelbase import Kernel File "/home/francesco/.local/lib/python3.6/site-packages/ipykernel/__init__.py", line 2, in <module> from .connect import * File "/home/francesco/.local/lib/python3.6/site-packages/ipykernel/connect.py", line 13, in <module> from IPython.core.profiledir import ProfileDir File "/home/francesco/.local/lib/python3.6/site-packages/IPython/__init__.py", line 56, in <module> from .terminal.embed import embed File "/home/francesco/.local/lib/python3.6/site-packages/IPython/terminal/embed.py", line 16, in <module> from IPython.terminal.interactiveshell import TerminalInteractiveShell File "/home/francesco/.local/lib/python3.6/site-packages/IPython/terminal/interactiveshell.py", line 19, in <module> from prompt_toolkit.enums import DEFAULT_BUFFER, EditingMode File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/__init__.py", line 16, in <module> from .application import Application File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/application/__init__.py", line 1, in <module> from .application import Application File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/application/application.py", line 39, in <module> from prompt_toolkit.buffer import Buffer File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/buffer.py", line 28, in <module> from .application.current import get_app File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/application/current.py", line 8, in <module> from prompt_toolkit.eventloop.dummy_contextvars import ContextVar # type: ignore File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/eventloop/__init__.py", line 1, in <module> from .async_generator import generator_to_async_generator File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/eventloop/async_generator.py", line 5, in <module> from typing import AsyncGenerator, Callable, Iterable, TypeVar, Union ImportError: cannot import name 'AsyncGenerator' [W 19:02:54.770 NotebookApp] Timeout waiting for kernel_info reply from 3bc915f0-472e-44a7-bc5a-66c909a21fad /home/francesco/JDemo/Python3/lib/python3.6/site-packages/notebook/base/zmqhandlers.py:292: RuntimeWarning: coroutine 'WebSocketHandler.get' was never awaited super(AuthenticatedZMQStreamHandler, self).get(*args, **kwargs) [W 19:02:55.803 NotebookApp] Replacing stale connection: 3bc915f0-472e-44a7-bc5a-66c909a21fad:642B2F3CE15D4896BC48D95131975EE3 [I 19:02:56.676 NotebookApp] KernelRestarter: restarting kernel (4/5), new random ports Traceback (most recent call last): File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/application/current.py", line 6, in <module> from contextvars import ContextVar ModuleNotFoundError: No module named 'contextvars' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/francesco/JDemo/Python3/lib/python3.6/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/home/francesco/JDemo/Python3/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/francesco/JDemo/Python3/lib/python3.6/site-packages/jkernel/jkernel.py", line 26, in <module> from ipykernel.kernelbase import Kernel File "/home/francesco/.local/lib/python3.6/site-packages/ipykernel/__init__.py", line 2, in <module> from .connect import * File "/home/francesco/.local/lib/python3.6/site-packages/ipykernel/connect.py", line 13, in <module> from IPython.core.profiledir import ProfileDir File "/home/francesco/.local/lib/python3.6/site-packages/IPython/__init__.py", line 56, in <module> from .terminal.embed import embed File "/home/francesco/.local/lib/python3.6/site-packages/IPython/terminal/embed.py", line 16, in <module> from IPython.terminal.interactiveshell import TerminalInteractiveShell File "/home/francesco/.local/lib/python3.6/site-packages/IPython/terminal/interactiveshell.py", line 19, in <module> from prompt_toolkit.enums import DEFAULT_BUFFER, EditingMode File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/__init__.py", line 16, in <module> from .application import Application File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/application/__init__.py", line 1, in <module> from .application import Application File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/application/application.py", line 39, in <module> from prompt_toolkit.buffer import Buffer File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/buffer.py", line 28, in <module> from .application.current import get_app File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/application/current.py", line 8, in <module> from prompt_toolkit.eventloop.dummy_contextvars import ContextVar # type: ignore File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/eventloop/__init__.py", line 1, in <module> from .async_generator import generator_to_async_generator File "/home/francesco/.local/lib/python3.6/site-packages/prompt_toolkit/eventloop/async_generator.py", line 5, in <module> from typing import AsyncGenerator, Callable, Iterable, TypeVar, Union ImportError: cannot import name 'AsyncGenerator' [W 19:02:59.690 NotebookApp] KernelRestarter: restart failed [W 19:02:59.691 NotebookApp] Kernel 3bc915f0-472e-44a7-bc5a-66c909a21fad died, removing from map. [I 19:04:44.636 NotebookApp] Saving file at /Untitled4.ipynb [I 19:04:57.052 NotebookApp] Interrupted... [I 19:04:57.053 NotebookApp] Shutting down kernels
---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
