Clinder for Jupyter on Ubuntu

I built Cling on my laptop with Ubuntu 15.04, following the instructions given at https://github.com/root-mirror/cling#jupyter because I wanted to use the Cling core for Jupyter. I installed Jupyter, I checked that Cling is in my PATH, but when I type the command

jupyter kernelspec install cling 

I get the following

 OSError: [Errno 2] No such file or directory: 'cling' 

Does anyone know what is going on?

+5
source share
3 answers

According to the source code , the jupyter kernelspec install expects a directory path containing the kernel specification file (kernel.json) as an argument. So if you cloned the cling repository into, say, ~ / cling / src, this should work:

 jupyter kernelspec install ~/cling/src/tools/cling/tools/Jupyter/kernel/cling 
+5
source

Probably because 3 folders of the Cling kernel are defined in your folder (C ++ 11, C ++ 14 and C ++ 17).
So instead of trying to add Cling, try adding one of these versions or all three if you want.

enter image description here

+2
source

I had the same problem just a minute ago, but I was able to solve it. I performed:

 $ jupyter kernelspec install --user cling-cpp11 

directly from /home/ubuntu_user/cling_ubuntu/share/cling/Jupyter/kernel .

The installation was successful, I went to my working directory and named jupyter notebook; It opened normally, but the core died immediately.

I thought the problem was that I should install cling from where I will call the laptop jupyter, and I did this:

After removing the kernel (also from /home/ubuntu_user/cling_ubuntu/share/cling/Jupyter/kernel ) with

 jupyter kernelspec uninstall cling-cpp11 

I repeated the entire installation process:

Suppose you usually call jupiter from /home/ubuntu_user and you have your cling repository here

 /home/ubuntu_user/cling_ubuntu. 

Then:

  • Go there: $ cd /home/ubuntu_user
  • $ source activate my_env (I work with Anaconda, so I activated my environment)
  • $ export PATH=/home/ubuntu_user/cling_ubuntu/bin:$PATH
  • $ cd cling_ubuntu/share/cling/Jupyter/kernel/cling-cpp11
  • $ pip install -e.
  • Here you should go to your future working directory.

    $ cd /home/ubuntu_user , type:

    $ jupyter kernelspec install --user cling_ubuntu/share/cling/Jupyter/kernel/cling-cpp11

    .. and the kernel is still alive and working fine.

0
source

Source: https://habr.com/ru/post/1243926/


All Articles