has2k1 / gnuplot_kernel

A Jupyter/IPython kernel for gnuplot
BSD 3-Clause "New" or "Revised" License
84 stars 25 forks source link

Fails to be recognized as kernel, on Ubuntu 20.04 #29

Open esternin opened 4 years ago

esternin commented 4 years ago

Tried first with the apt-get install gnuplot_kernel, later with an install from github. Install reports that all is well, but jupyter does not see the kernel. The system is up-to-date on the LT release 20.04.

$ sudo pip3 install git+https://github.com/has2k1/gnuplot_kernel.git@master -U
Collecting git+https://github.com/has2k1/gnuplot_kernel.git@master
  Cloning https://github.com/has2k1/gnuplot_kernel.git (to revision master) to /tmp/pip-req-build-vbijkgrg
  Running command git clone -q https://github.com/has2k1/gnuplot_kernel.git /tmp/pip-req-build-vbijkgrg
...
Successfully built gnuplot-kernel
Installing collected packages: gnuplot-kernel
  Attempting uninstall: gnuplot-kernel
    Found existing installation: gnuplot-kernel 0.4.1
    Uninstalling gnuplot-kernel-0.4.1:
      Successfully uninstalled gnuplot-kernel-0.4.1
Successfully installed gnuplot-kernel-0.4.1
$ pip3 list | grep gnuplot
gnuplot-kernel               0.4.1
$ jupyter kernelspec list
Available kernels:
  ir         /home/XXXX/.local/share/jupyter/kernels/ir
  python3    /usr/share/jupyter/kernels/python3
$ uname -a
Linux XXXX 5.4.0-52-generic #57-Ubuntu SMP Thu Oct 15 10:57:00 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Any suggestions?

has2k1 commented 4 years ago

Have you run?

$ python -m gnuplot_kernel install --user
esternin commented 4 years ago

I did not, as it seemed to be only applicable to user-space installations and was never required before, sudo apt-get install gnuplot_kernel was always sufficient.

I used sudo python3 -m gnuplot_kernel install and it added the kernel to the list.

There are other problems, like trying to restart the gnuplot kernel ("Restart and Run All", for example) causes kernel death and no restart. The workbook has to be closed to recover. The error seems to be specific to gnuplot-kernel:

...
  File "/usr/local/lib/python3.8/dist-packages/gnuplot_kernel/kernel.py", line 301, in do_shutdown
    self.wrapper.exit()
AttributeError: 'NoneType' object has no attribute 'exit'

With the above caveat, it is usable again. Thanks for the suggestion!

has2k1 commented 4 years ago

@esternin, can you open an issue for that "Restart and Run All" problem.