-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Open
Description
nltk.tree.Tree
uses the Tcl (tkinter) backend to draw trees. Unfortunately, that doesn't seem to work on a headless server, which is the setup I use: run Jupyter on the server and access it via the browser from another machine.
If python3-tk
is not installed, I get
ImportError: No module named '_tkinter', please install the python3-tk package
If it is, I get
TclError: no display name and no $DISPLAY environment variable
However, dot
works in such a setup, so it would be preferable if it was used as the backend instead of tk. Also, it could be used to implement _repr_svg_()
on Tree
, which would also be a very welcome addition, as svg is a much better format for these kinds of things than png.