So after installing xeus-cling using instructions from their official documentation, I found out that I could not add the c++11
, c++14
and c++17
directly to the jupyter notebook.
Also, to let you know, I am using miniconda3 installed from their official website running on Ubuntu 22.04. Therefore, from the xeus-cling github repo, I will be replacing mamba
with conda
where for xeus-cling installation, I ran the following commands:
conda create -n cling
conda activate cling
conda install xeus-cling -c conda-forge
Everything runs fine until it's time to install the Kernel Spec, where it might be confusing for starters. The commands
jupyter kernelspec install PREFIX/share/jupyter/xcpp11 --sys-prefix
jupyter kernelspec install PREFIX/share/jupyter/xcpp14 --sys-prefix
jupyter kernelspec install PREFIX/share/jupyter/xcpp17 --sys-prefix
might be intimidating at first.
If you did not change anything during installation, the miniconda will have been installed in the directory, /home/$USERNAME/miniconda3
.
Turns out that the jupyter kernels are installed in /home/$USERNAME/miniconda3/share/jupyter/kernels
.
To install the kernels, replace PREFIX/share/jupyter/xcpp17
with /home/$USERNAME/miniconda3/share/jupyter/kernels
. Therefore the commands are:
jupyter kernelspec install /home/$USERNAME/miniconda3/share/jupyter/kernels/xcpp11 --sys-prefix
jupyter kernelspec install /home/$USERNAME/miniconda3/share/jupyter/kernels/xcpp14 --sys-prefix
jupyter kernelspec install /home/$USERNAME/miniconda3/share/jupyter/kernels/xcpp17 --sys-prefix
For these commands you might require to run them as sudo
or append --user
to install to the current user only.