Commit Graph

79 Commits

Author SHA1 Message Date
ferdymercury
42d2fb1493 Remove references to Python2
copy-pasted from pitkajuh. See https://github.com/root-project/cling/pull/519
2024-07-26 09:59:04 +02:00
Damien L-G
6bbf1f3311 Use CLING_OPTS env variable to pass extra arguments to jupyter-cling-kernel
This patch let you customize your kernel:
```
{
  "display_name": "C++14-custom",
  "argv": [
      "jupyter-cling-kernel",
      "-f",
      "{connection_file}",
      "--std=c++14"
  ],
  "language": "C++",
  "env": {"CLING_OPTS": "-I<add_directory_to_include_search_path> -L<add_directory_to_library_search_path>"}
}
```
2018-03-23 16:59:08 +01:00
Houkime
51acb456a1 Add "language" field to kernel.json 2018-01-15 17:14:05 +01:00
Axel Naumann
3848d29556 Fix exception if cling is not found.
See https://stackoverflow.com/questions/48244332/c-jupyter-kernel-death
2018-01-15 15:59:58 +01:00
Dheepak Krishnamurthy
bf88ee12d3 Get correct path for cling
Required for Mac with `brew install cling`
2018-01-15 12:59:47 +01:00
Dheepak Krishnamurthy
f9db95721e Check in libexec folder as well
Required for Mac brew install
2018-01-15 12:59:47 +01:00
Yuki Yamaura
38923cd710 Add support C++1z for Jupyter kernel
When run C++17 kernel in Jupyter notebook cause some errors
due to currently clang-5.0 in https://root.cern.ch/download/cling/ is not
support c++17.
So add support to C++1z for Jupyter kernel and we can try some new
features in Jupyter notebook.

for avoiding following error:

[I 05:46:38.253 NotebookApp] Kernel restarted:
d3413fa0-7046-4b63-912b-a286610eacc1
error: invalid value 'c++17' in '-std=c++17'
note: use 'c++98' or 'c++03' for 'ISO C++ 1998 with amendments' standard
note: use 'gnu++98' or 'gnu++03' for 'ISO C++ 1998 with amendments and
GNU extensions' standard
note: use 'c++11' for 'ISO C++ 2011 with amendments' standard
note: use 'gnu++11' for 'ISO C++ 2011 with amendments and GNU
extensions' standard
note: use 'c++14' for 'ISO C++ 2014 with amendments' standard
note: use 'gnu++14' for 'ISO C++ 2014 with amendments and GNU
extensions' standard
note: use 'c++1z' for 'Working draft for ISO C++ 2017' standard
note: use 'gnu++1z' for 'Working draft for ISO C++ 2017 with GNU
extensions' standard
2017-09-06 16:44:07 +02:00
Diego Torres Quintanilla
952cf58b0d Fixed codemirror mode to appropriate value. Syntax highlighting in jupyter lab should work when https://github.com/jupyterlab/jupyterlab/pull/2187 is merged. 2017-05-12 09:14:05 +02:00
Axel Naumann
b9dbe1614f Update notebook, esp the kernelspec name. 2017-05-02 11:59:10 +02:00
Axel Naumann
8e2700d753 Fix ZMQ issues with threading:
run all ZMQ send()s from the main thread; run cling in a sub-thread.
2017-05-02 11:59:10 +02:00
Axel Naumann
97ec4b8e8a Add doc on the sideband mechanism. 2017-05-02 11:59:09 +02:00
Axel Naumann
af310ace1d Reflect changed Github repo name. 2017-04-05 11:44:05 +02:00
Sylvain Corlay
8bd13badc1 rename kernels
Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2017-02-21 20:23:27 +01:00
Maarten Scholl
0a1bab6bd8 Fixed c++17 version name in kernel file
I encountered the following error and the above change fixed it

Nov 22 22:37:47 thesis jupyter[2811]: [I 22:37:47.646 NotebookApp] The Jupyter Notebook is running at: http://0.0.0.0:8888/
Nov 22 22:37:47 thesis jupyter[2811]: [I 22:37:47.646 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
Nov 22 22:38:20 thesis jupyter[2811]: [I 22:38:20.303 NotebookApp] Kernel started: e416bf37-4f24-4aee-8e25-45c6fbbb85e6
Nov 22 22:38:21 thesis jupyter[2811]: [ClingKernelApp] CRITICAL | Bad config encountered during initialization:
Nov 22 22:38:21 thesis jupyter[2811]: [ClingKernelApp] CRITICAL | The 'std' trait of a ClingKernel instance must be any of ['c++11', 'c++14', 'c++17'], but a value of 'c++1z' <class 'str'> was specified.
Nov 22 22:38:23 thesis jupyter[2811]: [I 22:38:23.308 NotebookApp] KernelRestarter: restarting kernel (1/5)
Nov 22 22:38:24 thesis jupyter[2811]: [ClingKernelApp] CRITICAL | Bad config encountered during initialization:
Nov 22 22:38:24 thesis jupyter[2811]: [ClingKernelApp] CRITICAL | The 'std' trait of a ClingKernel instance must be any of ['c++11', 'c++14', 'c++17'], but a value of 'c++1z' <class 'str'> was specified.
Nov 22 22:38:26 thesis jupyter[2811]: [I 22:38:26.326 NotebookApp] KernelRestarter: restarting kernel (2/5)
Nov 22 22:38:27 thesis jupyter[2811]: [ClingKernelApp] CRITICAL | Bad config encountered during initialization:
Nov 22 22:38:27 thesis jupyter[2811]: [ClingKernelApp] CRITICAL | The 'std' trait of a ClingKernel instance must be any of ['c++11', 'c++14', 'c++17'], but a value of 'c++1z' <class 'str'> was specified.
Nov 22 22:38:29 thesis jupyter[2811]: [I 22:38:29.332 NotebookApp] KernelRestarter: restarting kernel (3/5)
Nov 22 22:38:30 thesis jupyter[2811]: [W 22:38:30.348 NotebookApp] Timeout waiting for kernel_info reply from e416bf37-4f24-4aee-8e25-45c6fbbb85e6
Nov 22 22:38:30 thesis jupyter[2811]: [I 22:38:30.365 NotebookApp] New terminal with specified name: 1
Nov 22 22:38:30 thesis jupyter[2811]: [ClingKernelApp] CRITICAL | Bad config encountered during initialization:
Nov 22 22:38:30 thesis jupyter[2811]: [ClingKernelApp] CRITICAL | The 'std' trait of a ClingKernel instance must be any of ['c++11', 'c++14', 'c++17'], but a value of 'c++1z' <class 'str'> was specified.
Nov 22 22:38:32 thesis jupyter[2811]: [I 22:38:32.338 NotebookApp] KernelRestarter: restarting kernel (4/5)
Nov 22 22:38:32 thesis jupyter[2811]: WARNING:root:kernel e416bf37-4f24-4aee-8e25-45c6fbbb85e6 restarted
Nov 22 22:38:32 thesis jupyter[2811]: [W 22:38:32.664 NotebookApp] Session not found: session_id='19509685-b888-480b-897b-be2cc8fed1cc'
Nov 22 22:38:32 thesis jupyter[2811]: [W 22:38:32.665 NotebookApp] 404 DELETE /api/sessions/19509685-b888-480b-897b-be2cc8fed1cc (192.168.0.24) 3.67ms referer=http://192.168.0.31:8888/notebooks/Untitled.ipynb?kernel_name=cling-c++17
Nov 22 22:38:33 thesis jupyter[2811]: [ClingKernelApp] CRITICAL | Bad config encountered during initialization:
Nov 22 22:38:33 thesis jupyter[2811]: [ClingKernelApp] CRITICAL | The 'std' trait of a ClingKernel instance must be any of ['c++11', 'c++14', 'c++17'], but a value of 'c++1z' <class 'str'> was specified.
Nov 22 22:38:35 thesis jupyter[2811]: [W 22:38:35.349 NotebookApp] KernelRestarter: restart failed
Nov 22 22:38:35 thesis jupyter[2811]: [W 22:38:35.350 NotebookApp] Kernel e416bf37-4f24-4aee-8e25-45c6fbbb85e6 died, removing from map.
Nov 22 22:38:35 thesis jupyter[2811]: ERROR:root:kernel e416bf37-4f24-4aee-8e25-45c6fbbb85e6 restarted failed!
Nov 22 22:38:35 thesis jupyter[2811]: ERROR:root:kernel e416bf37-4f24-4aee-8e25-45c6fbbb85e6 restarted failed!
Nov 22 22:38:35 thesis jupyter[2811]: [W 22:38:35.368 NotebookApp] Kernel deleted before session
Nov 22 22:38:35 thesis jupyter[2811]: [W 22:38:35.369 NotebookApp] 410 DELETE /api/sessions/ff344691-8fd6-4207-902e-01c944bdf7ae (192.168.0.24) 2.13ms referer=http://192.168.0.31:8888/notebooks/Untitled.ipynb
2016-11-23 08:59:46 +01:00
erlanger
c5216dd7b8 fix bug with os.readlink and regular files
Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2016-11-22 18:36:13 +01:00
erlanger
20420081cf support for c++17 (c++1z) in jupyter
Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2016-11-22 18:36:13 +01:00
erlanger
34460a3907 jupyter C++14/11: missing files in prev commit
Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2016-11-22 18:36:13 +01:00
erlanger
be4ad78245 Support for C++11/C++14 in jupyter
Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2016-11-22 18:36:13 +01:00
Pedro Henriques dos Santos Teixeira
615beb1def Does not ignore IPKernelApp.init_io
In latest jupyter versions this fixes AttributeError 'ClingKernelApp object has no attribute displayhook'
2016-09-22 16:21:01 +02:00
Axel Naumann
6a4af89230 Find cling includes wherever the install is copied to. 2016-07-29 17:44:10 +02:00
Axel Naumann
500473fc6c Move README.md out of kernel/ into Jupyter/. 2016-07-27 02:12:47 +02:00
Axel Naumann
78527f3493 Update contact info. 2016-07-22 19:29:12 +02:00
Jan Christoph Uhde
a558c4cf02 Check for existing libclingJupyter, not whether it's executable. 2016-04-09 11:14:06 +02:00
Axel Naumann
434d039331 Add python2 compat as suggested by @hellpanderrr in Issue #1. 2016-04-09 10:59:14 +02:00
Axel Naumann
ca24eff6a0 Remove dupe directory. 2016-04-01 16:14:10 +02:00
Axel Naumann
3354c15777 Update to current output, URL. 2016-04-01 10:44:15 +02:00
Axel Naumann
5021042a26 Formatting. 2016-03-31 14:59:13 +02:00
Axel Naumann
a754fcc65e Update to Jupyter 4.1 binary names. 2016-02-08 11:44:07 +01:00
Axel Naumann
cc2ca03981 Fix cling GitHub Issue #1: libclingJupyter might be called .so 2016-02-08 11:44:07 +01:00
Axel Naumann
692dd6d7ee Use typical sub-llvm path. 2016-02-02 23:14:06 +01:00
Axel Naumann
8843128773 Clarify the Jupyter kernel install procedure. 2016-02-02 20:14:09 +01:00
Axel Naumann
95bba98231 Remove unused LICENSE file (kernel uses LICENSE from cling). 2016-02-02 20:14:09 +01:00
Axel Naumann
5c750a2c4c Replace debug path by proper error message. 2015-12-16 20:29:22 +01:00
Axel Naumann
f1bf5f1a55 As agreed by Min, change license to that of cling. 2015-12-16 20:29:22 +01:00
Axel Naumann
66b7181bbb Use custom, non-decaying c_void_p as restype. 2015-12-16 20:29:22 +01:00
Axel Naumann
0511668144 set_next_input payload destroys processing of execute_result! 2015-12-16 20:29:22 +01:00
Axel Naumann
d63e3a4b08 DEBUG: Use llvm resource dir from install. 2015-12-16 20:29:22 +01:00
Axel Naumann
50556641f2 Fix pipe read. 2015-12-16 20:29:21 +01:00
Min RK
fae98382e3 add iopub pipe
pair programming with Axel
2015-12-16 20:29:21 +01:00
Axel Naumann
b571661050 Update the input code to contain magic (will be unload marker). 2015-12-16 20:29:21 +01:00
Axel Naumann
67c8a03d55 Show stringResult from eval. 2015-12-16 20:29:21 +01:00
Axel Naumann
a5e047f8c0 Capture cling_eval() stringResult. 2015-12-16 20:29:21 +01:00
Axel Naumann
c9a541858d Set restype of code completion interfaces. 2015-12-16 20:29:21 +01:00
Axel Naumann
fb03f8f326 Cleanup. 2015-12-16 20:29:21 +01:00
Axel Naumann
c1ccf5e244 Refactor, slightly. 2015-12-16 20:29:21 +01:00
Axel Naumann
40020a91ae Remove unused config 2015-12-16 20:29:21 +01:00
Axel Naumann
afa4a2784b Use libclingJupyter. 2015-12-16 20:29:21 +01:00
Min RK
7774e9bbfd capture stderr as well 2015-12-16 20:29:21 +01:00
Min RK
5cc49be53c require ipykernel 2015-12-16 20:29:21 +01:00
Min RK
01a82f38fd prepare for ctypes-cling API 2015-12-16 20:29:21 +01:00