cling icon indicating copy to clipboard operation
cling copied to clipboard

[Errno2] No such file or directory: 'jupyter-cling-kernel'

Open Ivan-Igorevich opened this issue 2 years ago • 3 comments

Setup

  • OS: Mac OS X Big Sur (fresh installation
  • Python 3.9.13
  • cling version 0.8~dev (installed from cling_2020-11-05_mac1015.tar.bz2 2020-11-05 14:20 179M)
  • kernel (installed following https://github.com/root-project/cling/tree/master/tools/Jupyter)
Available kernels:
  cling-cpp11    /Users/ivan-igorevich/Library/Jupyter/kernels/cling-cpp11
  cling-cpp17    /Users/ivan-igorevich/Library/Jupyter/kernels/cling-cpp17
  python3        /Users/ivan-igorevich/Library/Jupyter/kernels/python3

What am I doing?

check if cling works fine, done

ivan-igorevich@MacBook-Pro-Ivan ~ % cling
****************** CLING ******************
* Type C++ code and press enter to run it *
*             Type .q to exit             *
*******************************************
[cling]$ #include <iostream>
[cling]$ std::cout << "Hello\n";
Hello
[cling]$ 

Then trying to open notebook

ivan-igorevich@MacBook-Pro-Ivan kernel % jupyter notebook
# here notebook things are happening
     or http://127.0.0.1:8888/?token=566e5724c4fdf448318723d537dd63ca88e273d997d6f694

Then I try to open a notebook file right in a kernel folder and get

[W 00:36:57.577 NotebookApp] Notebook cling.ipynb is not trusted
[W 00:36:57.863 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20220719003650 (::1) 63.510000ms referer=http://localhost:8888/notebooks/cling.ipynb
[E 00:37:10.291 NotebookApp] Failed to run command:
    ['jupyter-cling-kernel', '-f', '/Users/ivan-igorevich/Library/Jupyter/runtime/kernel-8e0b6318-fe42-40bb-89fa-6892842f06af.json', '--std=c++17']
        PATH='/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/Users/ivan-igorevich/cling/bin'
        with kwargs:
    {'stdin': -1, 'stdout': None, 'stderr': None, 'cwd': '/Users/ivan-igorevich/cling/share/cling/Jupyter/kernel', 'start_new_session': True}
    
[E 00:37:10.298 NotebookApp] [Errno 2] No such file or directory: 'jupyter-cling-kernel'

# long python traceback, will include in follow-up if needed

    FileNotFoundError: [Errno 2] No such file or directory: 'jupyter-cling-kernel'
[W 22:23:07.291 NotebookApp] Unhandled error
[E 22:23:07.292 NotebookApp] {
      "Host": "localhost:8888",
      "Accept": "application/json, text/javascript, */*; q=0.01",
      "Referer": "http://localhost:8888/notebooks/cling.ipynb",
      "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Safari/605.1.15"
    }
[E 22:23:07.292 NotebookApp] 500 POST /api/sessions (::1) 200.620000ms referer=http://localhost:8888/notebooks/cling.ipynb

The issue

Kernel is not working (throws an exception and stops. Can you please tell me, what am I doing wrong, and how to fix this?

Ivan-Igorevich avatar Jul 19 '22 19:07 Ivan-Igorevich

Do you have jupyter-cling-kernel "somewhere"?

Axel-Naumann avatar Oct 14 '22 12:10 Axel-Naumann

Do you have jupyter-cling-kernel "somewhere"?

how do I check it? I have those kernels listed in an issue, aren't they the ones I need?

Ivan-Igorevich avatar Oct 16 '22 14:10 Ivan-Igorevich

You could use find. All I know now is that Python cannot find the command jupyter-cling-kernel so it's not in your $PATH.

Axel-Naumann avatar Nov 10 '22 07:11 Axel-Naumann