cling icon indicating copy to clipboard operation
cling copied to clipboard

Cling Jupyter kernel not working

Open TaiXeflar opened this issue 1 year ago • 2 comments

After Cling entire build, the Cling executable works very well. But I've found that Jupyter Tools is not found in<CLING_INSTALL_PATH>/share/location.

Then I navigate to source location<CLING_SRC_PATH>/tools/cling/tools/Jupyter/kerneland do the register Jupyter kernel by Install clingKernel and jupyter-kernelspec:

  • PowerShell/CMD Shell
  pip install -e .

  jupyter-kernelspec install cling-cpp17
  jupyter-kernelspec install cling-cpp1z
  jupyter-kernelspec install cling-cpp14
  jupyter-kernelspec install cling-cpp11

Here comes with two Cling Jupyter kernel not working status:

By using VSCode Jupyter Notebook

First I want try in vscode and been denied execute to run kernel by told that cling Jupyter kernels must add to trusted kernels in settings.json, then I added 4 kernels in settings and showed running error with message "spawn Jupyter-Cling-Kernel ENOENT" error.

By using Webpage Jupyter Notebook

Assume if it's only vscode extentions' compatability caused problems, I tried using individual terminal running local Jupyter server, exclude "403 Forbidden" error status, whatever using Edge or Chrome can logging create a notebook actaully can select 4 kernels "C++17", "C++1z", "C++14" and "C++11" with kernel connection status "Unknown Kernel" and won't work.

In conclution I think is the kernel settings error, not VSCode's problem. I ensured Cling and Python's Install path has been added to PATH, both can be called in terminal. Is there anyway can modify the kernel register settings or need to rebuild/reinstall?

TaiXeflar avatar Sep 11 '23 08:09 TaiXeflar

After adding the kernelspecs did you add tools/Jupyter/kernel/scripts to your PATH? I couldn't find this step mentioned in the documentation, but the kernels will not work otherwise (at least on MacOS).

mcbarton avatar Nov 13 '23 20:11 mcbarton

Yes, I've add tools/Jupyter/kernel/scripts and the Cling CMAKE Install PATH to System PATH. It still not works then. I'll continue give it try.

TaiXeflar avatar Nov 15 '23 07:11 TaiXeflar