PythonCall.jl icon indicating copy to clipboard operation
PythonCall.jl copied to clipboard

Dead Kernel in Jupyter Notebook

Open on46zohu opened this issue 2 years ago • 8 comments

Whenever I tried to call juliacall in a ipython Jupyter notebook, I face the issue below:

The kernel appears to have died. It will restart automatically.

Is there any solution for it?

on46zohu avatar Feb 28 '23 14:02 on46zohu

It works fine for me. I'll need more information to help - how exactly can I reproduce your error, and what package versions do you have installed?

cjdoris avatar Feb 28 '23 15:02 cjdoris

What I only did was to try "from juliacall import Main as jl, convert as jlconvert" in an empty Jupyter python3 notebook. (also tried import juliacall).

And this is the output of !pip list : python 3.7.14 julia 0.5.7 juliacall 0.9.12 juliapkg 0.1.10 jupyter 1.0.0 jupyter_client 7.3.5 jupyter-console 6.4.4 jupyter-core 4.11.1 jupyterlab-pygments 0.2.2 jupyterlab-widgets 3.0.3

on46zohu avatar Feb 28 '23 21:02 on46zohu

  • this is the output of !julia --version: julia version 1.8.1

on46zohu avatar Mar 01 '23 08:03 on46zohu

Do you get any errors in the Jupyter output in the terminal?

Do you also get errors if you run the same commands from the ordinary python prompt in the terminal?

cjdoris avatar Mar 03 '23 08:03 cjdoris

I am working on a local Jupyter server environment, so I do not have access to Jupyter output in the terminal. When I try it in the python3 directly, it works without any issue. But, in jupyter server, the kernel dies.

on46zohu avatar Mar 03 '23 10:03 on46zohu

This issue has been marked as stale because it has been open for 30 days with no activity. If the issue is still relevant then please leave a comment, or else it will be closed in 7 days.

github-actions[bot] avatar Aug 29 '23 01:08 github-actions[bot]

This issue has been closed because it has been stale for 7 days. You can re-open it if it is still relevant.

github-actions[bot] avatar Sep 06 '23 01:09 github-actions[bot]

Hi @cjdoris , I have been running juliacall in a Jupyter notebook and ran into a very similar issue. We eventually figured out the cause was a messed up conda environment. Basically, we have EnvA (the default) and EnvB. juliacall needs GLIBCXX_3.4.26, but this library was installed in EnvA but not in EnvB. The Jupyter kernel.json is missing a conda activate EnvB so libjulia can't find the glibc it needs.

kshyatt-aws avatar May 15 '24 15:05 kshyatt-aws