У меня есть следующая трассировка, когда я запускаю ядро c ++ 14 jupyter, используя cling. Я загрузил cling_2018-01-11_mac1012.tar.bz2
от
https://root.cern.ch/download/cling/
Затем добавил бин к пути. Для этого я открыл терминал и вошел
sudo nano /etc/paths
Вставил мой пароль, а затем, в нижней части файла, ввел путь к бинарной папке из загрузки (которую я получил, нажав команду i в файле, чтобы получить информацию), вышел и сохранил буфер. Протестируйте это с помощью
echo $PATH
Как только он был добавлен к пути, откройте новый терминал. Перейдите в загрузку, затем установите ядро в:
/share/cling/Jupyter/kernel
pip install .
jupyter kernelspec install cling-cpp14
Затем я открыл блокнот со своего рабочего стола, открыл блокнот с ++ 14, но, к сожалению, ядро умирает. Вот обратная связь. Любая помощь приветствуется.
Last login: Sat Jan 13 20:50:16 on ttys000
Air-2:~ $ jupyter notebook
[I 20:52:08.968 NotebookApp] Serving notebooks from local directory: /Users/
[I 20:52:08.968 NotebookApp] 0 active kernels
[I 20:52:08.968 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/?token=d80248d47c35d5f960dc7206a612940826e425ca9f065740
[I 20:52:08.968 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 20:52:08.971 NotebookApp]
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8888/?token=d80248d47c35d5f960dc7206a612940826e425ca9f065740
[I 20:52:09.423 NotebookApp] Accepting one-time-token-authenticated connection from ::1
[I 20:52:17.303 NotebookApp] Creating new notebook in
[I 20:52:17.752 NotebookApp] Kernel started: 66454176-a4a3-4d56-b1d9-4ef88fa0195d
Traceback (most recent call last):
File "/Users//anaconda/bin/jupyter-cling-kernel", line 4, in <module>
main()
File "/Users//anaconda/lib/python3.6/site-packages/clingkernel.py", line 344, in main
ClingKernelApp.launch_instance()
File "/Users//anaconda/lib/python3.6/site-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "<decorator-gen-120>", line 2, in initialize
File "/Users//anaconda/lib/python3.6/site-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/Users//anaconda/lib/python3.6/site-packages/ipykernel/kernelapp.py", line 454, in initialize
self.init_kernel()
File "/Users//anaconda/lib/python3.6/site-packages/ipykernel/kernelapp.py", line 365, in init_kernel
user_ns=self.user_ns,
File "/Users//anaconda/lib/python3.6/site-packages/traitlets/config/configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "/Users//anaconda/lib/python3.6/site-packages/clingkernel.py", line 101, in __init__
whichCling = os.readlink(shutil.which('cling'))
TypeError: readlink: path should be string, bytes or os.PathLike, not NoneType
[I 20:52:20.755 NotebookApp] KernelRestarter: restarting kernel (1/5)
Traceback (most recent call last):
File "/Users//anaconda/bin/jupyter-cling-kernel", line 4, in <module>
main()
File "/Users//anaconda/lib/python3.6/site-packages/clingkernel.py", line 344, in main
ClingKernelApp.launch_instance()
File "/Users//anaconda/lib/python3.6/site-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "<decorator-gen-120>", line 2, in initialize
File "/Users//anaconda/lib/python3.6/site-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/Users//anaconda/lib/python3.6/site-packages/ipykernel/kernelapp.py", line 454, in initialize
self.init_kernel()
File "/Users//anaconda/lib/python3.6/site-packages/ipykernel/kernelapp.py", line 365, in init_kernel
user_ns=self.user_ns,
File "/Users//anaconda/lib/python3.6/site-packages/traitlets/config/configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "/Users//anaconda/lib/python3.6/site-packages/clingkernel.py", line 101, in __init__
whichCling = os.readlink(shutil.which('cling'))
TypeError: readlink: path should be string, bytes or os.PathLike, not NoneType
[I 20:52:23.761 NotebookApp] KernelRestarter: restarting kernel (2/5)
Traceback (most recent call last):
File "/Users//anaconda/bin/jupyter-cling-kernel", line 4, in <module>
main()
File "/Users//anaconda/lib/python3.6/site-packages/clingkernel.py", line 344, in main
ClingKernelApp.launch_instance()
File "/Users//anaconda/lib/python3.6/site-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "<decorator-gen-120>", line 2, in initialize
File "/Users//anaconda/lib/python3.6/site-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/Users//anaconda/lib/python3.6/site-packages/ipykernel/kernelapp.py", line 454, in initialize
self.init_kernel()
File "/Users//anaconda/lib/python3.6/site-packages/ipykernel/kernelapp.py", line 365, in init_kernel
user_ns=self.user_ns,
File "/Users//anaconda/lib/python3.6/site-packages/traitlets/config/configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "/Users//anaconda/lib/python3.6/site-packages/clingkernel.py", line 101, in __init__
whichCling = os.readlink(shutil.which('cling'))
TypeError: readlink: path should be string, bytes or os.PathLike, not NoneType
[I 20:52:26.771 NotebookApp] KernelRestarter: restarting kernel (3/5)
Traceback (most recent call last):
File "/Users//anaconda/bin/jupyter-cling-kernel", line 4, in <module>
main()
File "/Users//anaconda/lib/python3.6/site-packages/clingkernel.py", line 344, in main
ClingKernelApp.launch_instance()
File "/Users//anaconda/lib/python3.6/site-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "<decorator-gen-120>", line 2, in initialize
File "/Users//anaconda/lib/python3.6/site-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/Users//anaconda/lib/python3.6/site-packages/ipykernel/kernelapp.py", line 454, in initialize
self.init_kernel()
File "/Users//anaconda/lib/python3.6/site-packages/ipykernel/kernelapp.py", line 365, in init_kernel
user_ns=self.user_ns,
File "/Users//anaconda/lib/python3.6/site-packages/traitlets/config/configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "/Users//anaconda/lib/python3.6/site-packages/clingkernel.py", line 101, in __init__
whichCling = os.readlink(shutil.which('cling'))
TypeError: readlink: path should be string, bytes or os.PathLike, not NoneType
[W 20:52:27.804 NotebookApp] Timeout waiting for kernel_info reply from 66454176-a4a3-4d56-b1d9-4ef88fa0195d
[I 20:52:29.780 NotebookApp] KernelRestarter: restarting kernel (4/5)
WARNING:root:kernel 66454176-a4a3-4d56-b1d9-4ef88fa0195d restarted
Traceback (most recent call last):
File "/Users//anaconda/bin/jupyter-cling-kernel", line 4, in <module>
main()
File "/Users//anaconda/lib/python3.6/site-packages/clingkernel.py", line 344, in main
ClingKernelApp.launch_instance()
File "/Users//anaconda/lib/python3.6/site-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "<decorator-gen-120>", line 2, in initialize
File "/Users//anaconda/lib/python3.6/site-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/Users//anaconda/lib/python3.6/site-packages/ipykernel/kernelapp.py", line 454, in initialize
self.init_kernel()
File "/Users//anaconda/lib/python3.6/site-packages/ipykernel/kernelapp.py", line 365, in init_kernel
user_ns=self.user_ns,
File "/Users//anaconda/lib/python3.6/site-packages/traitlets/config/configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "/Users//anaconda/lib/python3.6/site-packages/clingkernel.py", line 101, in __init__
whichCling = os.readlink(shutil.which('cling'))
TypeError: readlink: path should be string, bytes or os.PathLike, not NoneType
[W 20:52:32.793 NotebookApp] KernelRestarter: restart failed
[W 20:52:32.794 NotebookApp] Kernel 66454176-a4a3-4d56-b1d9-4ef88fa0195d died, removing from map.
ERROR:root:kernel 66454176-a4a3-4d56-b1d9-4ef88fa0195d restarted failed!
[W 20:52:32.808 NotebookApp] Kernel deleted before session
[W 20:52:32.809 NotebookApp] 410 DELETE /api/sessions/8cb8bf43-8330-4f62-8932-eab94eb8e91c (::1) 2.60ms referer=http://localhost:8888/notebooks/Untitled4.ipynb?kernel_name=cling-cpp14
[I 20:54:17.747 NotebookApp] Saving file at /Untitled4.ipynb
Затем я открыл блокнот со своего рабочего стола,
Похоже, что ноутбук не нашел цепочку в $PATH
, Текущий мастер должен вести себя лучше и на самом деле сказать вам. Вы можете попробовать использовать завтрашний вечер от https://root.cern/download/cling/
Чтобы решить вашу проблему под рукой, запустите ноутбук с терминала, который имеет cling
доступны, например, путем настройки $PATH
или добавив символическую ссылку на /usr/local/bin/cling
,
Других решений пока нет …