With a simple example with nltk.tree
running on a jupyter-notebook on a remote server:
import nltk
parser = nltk.RegexpParser(r'NP: {<[NJ].*>+}')
tree = parser.parse(nltk.corpus.brown.tagged_sents()[0])
tree
will give you the error TclError: no display name and no $DISPLAY environment variable
. I have tried a bunch of solutions to this, e.g., Agg
backend, ssh -Y
, Ipython display
, %matplotlib inline
, but none seems working. Are there any solutions to this issue as of today?