has2k1 / gnuplot_kernel

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

Fix kernel installation issue #14

Closed dsblank closed 6 years ago

dsblank commented 6 years ago

Since metakernel install changed, you need to do three things:

  1. Change __main__.py to:
from .kernel import GnuplotKernel

if __name__ == "__main__":
    GnuplotKernel.run_as_main()
  1. Change kernel.py to include:
import sys

class GnuplotKernel(ProcessMetaKernel):
    kernel_json = {
        'argv': [sys.executable,
                 '-m', 'gnuplot_kernel',
                 '-f', '{connection_file}'],
        'display_name': 'gnuplot',
        'language': 'gnuplot',
        'name': 'gnuplot',
    }
  1. Change setup.py. It can now remove the extra install complications; for example, see https://github.com/Calysto/calysto_scheme/blob/master/setup.py for example.

Then you can install the kernel through recommended:

pip install gnuplot_kernel
python -m gnuplot_kernel install
has2k1 commented 6 years ago

@dsblank, Thank You for the tip-off.