Closed azinsharaf closed 1 year ago
Are you talking about the --kernel-connection-file
switch?
Warning Just to warn you, this feature is pretty experimental at the moment, and it still needs a fair amount of work!
To connect to an existing kernel with euporie, you can do the following:
Launch an existing kernel, e.g.:
jupyter-console -f=/tmp/kernel-connection-file.json --kernel=pypy3
Connect the existing kernel using euporie e.g.:
euporie-console --kernel-connection-file=/tmp/kernel-connection-file.json --kernel-name=pypy3
(There is currently a bug in euporie where the name of a non-default kernel will not be displayed correctly unless you specify the kernel name.)
You should now be able to use the kernel in both clients.
All kernel outputs will be displayed regardless of which client generated them. In a notebook, outputs from other clients will be attached to the currently selected cell.
This video demonstrates this:
I haven't tried this on Windows yet, but I imagine it should work in the same way.
wow!
@875d & @joouha
Thanks. I need the content of kernel-connection-file.json
file.
The kernel-connection-file.json
is created when a kernel is launched, so running:
jupyter-console -f=/tmp/kernel-connection-file.json
creates a file at /tmp/kernel-connection-file.json
with contents like the this:
{
"shell_port": 56017,
"iopub_port": 41729,
"stdin_port": 46507,
"control_port": 37753,
"hb_port": 51365,
"ip": "127.0.0.1",
"key": "fe947379-d5f2f1aba4ba891647221c7e",
"transport": "tcp",
"signature_scheme": "hmac-sha256",
"kernel_name": ""
}
Euporie can read this file and use it to connect to a kernel which is already running.
thanks @joouha. It created the config file so i close this issue. The euporie doesn't work with my python setup in Windows so I may ask that question in a separate post to see if it is doable to use it or not.
Hi, Can someone give me a config file example for
euporie notebook
for non-default kernel name and kernel connection file? I am using it on Windows and can't connect to an existing kernel in a python venv.