jupyter-xeus / xeus-cling

Jupyter kernel for the C++ programming language
BSD 3-Clause "New" or "Revised" License
3.02k stars 292 forks source link

C++ kernel not usable (conda, MacOS) #447

Open ashnaahmad opened 1 year ago

ashnaahmad commented 1 year ago

I have created a conda environment for cling, installed xeus-cling and jupyter notebook, started running a notebook and tried to connect to the remote kernel via the URL. I have tried versions 11, 14 and 17. In all 3 versions, the process terminates with Failed to start the kernel. Kernel C++17 is not usable. Check the Jupyter output tab for more information. This seems to be different from the "Waiting for Jupyter session to be idle" issue, although it does start with the same message.

Logs: error 16:44:22.379: Error in execution (get message for cell) [s [Error]: Kernel C++14 is not usable. Check the Jupyter output tab for more information. at k.waitForIdleOnSession (/Users/ashnaahmad/.vscode/extensions/ms-toolsai.jupyter-2022.8.1002431955/out/extension.node.js:2:1942413) at process.processTicksAndRejections (node:internal/process/task_queues:96:5) at async k.createNewKernelSession (/Users/ashnaahmad/.vscode/extensions/ms-toolsai.jupyter-2022.8.1002431955/out/extension.node.js:2:2223208) at async k.connect (/Users/ashnaahmad/.vscode/extensions/ms-toolsai.jupyter-2022.8.1002431955/out/extension.node.js:2:2221926) at async u.startNew (/Users/ashnaahmad/.vscode/extensions/ms-toolsai.jupyter-2022.8.1002431955/out/extension.node.js:2:2230566) at async s (/Users/ashnaahmad/.vscode/extensions/ms-toolsai.jupyter-2022.8.1002431955/out/extension.node.js:2:2166861) at async _.createNotebookInstance (/Users/ashnaahmad/.vscode/extensions/ms-toolsai.jupyter-2022.8.1002431955/out/extension.node.js:2:2167024) at async _.createNotebook (/Users/ashnaahmad/.vscode/extensions/ms-toolsai.jupyter-2022.8.1002431955/out/extension.node.js:2:2168029) at async t.Kernel.createJupyterSession (/Users/ashnaahmad/.vscode/extensions/ms-toolsai.jupyter-2022.8.1002431955/out/extension.node.js:2:2246177) at async t.Kernel.start (/Users/ashnaahmad/.vscode/extensions/ms-toolsai.jupyter-2022.8.1002431955/out/extension.node.js:2:2241145) at async k.wrapKernelMethodImpl (/Users/ashnaahmad/.vscode/extensions/ms-toolsai.jupyter-2022.8.1002431955/out/extension.node.js:2:2492201)] { category: 'invalidkernel', kernelConnectionMetadata: { kind: 'startUsingRemoteKernelSpec', interpreter: undefined, kernelSpec: { specFile: undefined, interpreterPath: undefined, isRegisteredByVSC: undefined, name: 'xcpp14', argv: [Array], language: 'C++14', executable: '/Users/ashnaahmad/opt/anaconda3/envs/cling/bin/xcpp', display_name: 'C++14', metadata: {}, env: {}, interrupt_mode: undefined }, id: '3ebe811ad1c9ae389acb2d909e894d1fb827f79c42e5fe23007886fb2629fca1..xcpp14./Users/ashnaahmad/opt/anaconda3/envs/cling/bin/xcpp././users/ashnaahmad/opt/anaconda3/envs/cling/bin/xcpp#-f#{connection_file}#-std=c++14', baseUrl: 'http://127.0.0.1:8889/', serverId: '3ebe811ad1c9ae389acb2d909e894d1fb827f79c42e5fe23007886fb2629fca1' } }

Thanks in advance!

xdevs-tmp commented 1 year ago

I face the same issue, only xcpp11 is working, not for C++14 and C++17, both of these 2 versions reports Kernel not found. I tried it under jupyter/datascience-notebook, it said: Kernel does not exist.

ServerApp] 404 GET /api/kernels/d589a150-3604-461c-8122-36b4b6375cc3?1668255204450 (122.20.0.1): Kernel does not exist: d589a150-3604-461c-8122-36b4b6375cc3