On Mac, the kernel is looking in wrong place for libclingJupyter.{so,dylib,dll}
If I start jupyter-notebook from the parent of <my_cling_dir>, the kernel starts and runs fine.
If I start it anywhere else, I get: RuntimeError: Cannot find cling_2017-05-23_mac1011/lib/libclingJupyter.{so,dylib,dll}
Maybe it is looking for the dylib relative to the launch directory?
Is this still the case? We had a couple of fixes to the "where's my libclingJupyter" logic lately (and I haven't heard any other complaints)...
Using cling version 0.5 installed from homebrew. Then following https://github.com/root-project/cling/tree/master/tools/Jupyter instruction, and it is still the case that "where is my libclingJupyter" logic seems still does not work.
Traceback (most recent call last):
File "/Volumes/Data/anaconda/bin/jupyter-cling-kernel", line 6, in <module>
exec(compile(open(__file__).read(), __file__, 'exec'))
File "/usr/local/Cellar/cling/0.5_1/libexec/share/cling/Jupyter/kernel/scripts/jupyter-cling-kernel", line 4, in <module>
main()
File "/usr/local/Cellar/cling/0.5_1/libexec/share/cling/Jupyter/kernel/clingkernel.py", line 344, in main
ClingKernelApp.launch_instance()
File "/Volumes/Data/anaconda/lib/python2.7/site-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "<decorator-gen-121>", line 2, in initialize
File "/Volumes/Data/anaconda/lib/python2.7/site-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/Volumes/Data/anaconda/lib/python2.7/site-packages/ipykernel/kernelapp.py", line 457, in initialize
self.init_kernel()
File "/Volumes/Data/anaconda/lib/python2.7/site-packages/ipykernel/kernelapp.py", line 368, in init_kernel
user_ns=self.user_ns,
File "/Volumes/Data/anaconda/lib/python2.7/site-packages/traitlets/config/configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "/usr/local/Cellar/cling/0.5_1/libexec/share/cling/Jupyter/kernel/clingkernel.py", line 128, in __init__
raise RuntimeError('Cannot find ' + clingInstDir + '/lib/libclingJupyter.{so,dylib,dll}')
I have the same problem!
Damn. Would someone mind taking a look at this and submitting a PR that fixes this, once and for all? Can't be that difficult ;-)
Is this related to https://github.com/root-project/cling/issues/209#issuecomment-365972901 i.e. missing pip install of the clingkernel?
I have the same problem!
That's what I did:
brew install cling cling --version
pyenv version pyenv virtualenv cpp pyenv global cpp pip install jupyter
pyenv activate cpp jupyter notebook
brew list cling export PATH=/usr/local/Cellar/cling/0.5_1/bin:$PATH cd /usr/local/Cellar/cling/0.5_1/libexec/share/cling/Jupyter/kernel pip3 install -e . sudo jupyter-kernelspec install --user cling-cpp17 sudo jupyter-kernelspec install --user cling-cpp1z sudo jupyter-kernelspec install --user cling-cpp14 sudo jupyter-kernelspec install --user cling-cpp11
Then I encountered: RuntimeError: Cannot find ../libexec/lib/libclingJupyter.{so,dylib,dll}
This is also the case for me when I follow the standard CPT build instructions on Debian 9.5:
wget https://raw.githubusercontent.com/root-project/cling/master/tools/packaging/cpt.py
chmod +x cpt.py
./cpt.py --check-requirements && ./cpt.py --create-dev-env Debug --with-workdir=./cling-build/
Seems the libclingJupyter file is simply not copied to <install_dir>/lib. Copying over the entire /lib directory from the build dir to the install dir fixes the problem for me, but that's obviously not the proper way to do things.
P.S. Only a bunch of include files from clang are in the <install_dir>/lib folder after running the commands above, <install_dir>/lib is otherwise empty.
I wanted to PR on this but it seems to be solved in master (pb from relative symlink not being resolved).
Perhaps you could do a bugfix release for mac users?
Any updates? Is this fixed? xeus-cling also doesn't work on the latest macOS, so I am curious if this works.
In particular, I can't even find the Jupyter directory on the brew-installed cling:
/usr/local/Cellar/cling
❯ fd -uuu jupyter
0.9/libexec/lib/libclingJupyter.dylib
If it was fixed in Feb 2019 then cling 0.9 should definitely contain that fix. What do the xeus-cling people say on this, did you contact them?