I figured it out.
* The root directory for the Tornado web application is sage/venv/share/jupyter (determined by trial and error).
* The path component in the url that the jupyter client uses to load the widget extension is
/nbextensions/widgets/notebook/js/extension.js
* There is no directory named sage/venv/share/jupyter/nbextensions/widgets in the sage 9.5 tree. Instead
there is a directory named sage/venv/share/jupyter/nbextensions/jupyter-js-widgets.
My fix was to create the directory sage/venv/share/jupyter/nbextensions/widgets/notebook
and a symlink sage/venv/share/jupyter/nbextensions/widgets/notebook/js -> ../../jupyter-js-widgets
With that change I get working widgets. Experiment indicates that the jupyter-js-widgets directory
must exist. But the widgets directory must also exist. Why does the client use a path that does not
exist? I do not know. How can it be changed to use the correct path? I was not able to figure that
out. I could not find the code which the client uses to constructs its urls. Maybe it is somewhere
inside a gigantic minimized javascript file. Who knows? Files containing only one line are not easily
searched with tools like grep. I guess that is why facebook and twitter like them so much.
- Marc