ipython-contrib / jupyter_contrib_nbextensions

A collection of various notebook extensions for Jupyter
http://jupyter-contrib-nbextensions.readthedocs.io/en/latest
Other
5.23k stars 806 forks source link

Improve `jupyter nbextension enable` #1521

Open artgoldberg opened 4 years ago

artgoldberg commented 4 years ago

Hi All

This is the first time I'm using jupyter nbextension enable. I'm finding its code and documentation very difficult to use.

WRT the code, I'm loading a JS program I've copied from a website. THis command works:

!jupyter nbextension install extensions/codehighlighter.js --user

producing

Up to date: /root/.local/share/jupyter/nbextensions/codehighlighter.js

To initialize this nbextension in the browser every time the notebook (or other app) loads:

      jupyter nbextension enable <the entry point> --user

But I cannot get jupyter nbextension enable to work.

  1. I cannot find a definition for <the entry point>
  2. When I try various potential values for <the entry point>, I get errors that I cannot understand. This:

    jupyter nbextension enable extensions/codehighlighter --user

generates:

Enabling notebook extension extensions/codehighlighter...
  - Validating: problems found:
    - require?  X extensions/codehighlighter
  1. Other attempts all produce virtually the similar error messages:

    !jupyter nbextension enable extensions/codehighlighter/main --user

makes

Enabling notebook extension extensions/codehighlighter/main...
  - Validating: problems found:
    - require?  X extensions/codehighlighter/main

I find this error incomprehensible, and cannot find documentation for it online. E.g., what does the X mean?

In my view jupyter nbextension enable needs clear documentation, clear examples, a good --help message, and better error messages.

Thanks for listening! Arthur