Hi,

I want to build a Zeppelin docker image for my self. The docker image is
based on ubuntu:wily, and has openjdk-8-jre and python3 installed. I also
installed other packages that I need.

After started Zeppelin in the docker, I am able to access the webapp from
my local browser. I tried to execute some simple Python script, and it
works fine. But when I try to run the matplotlib example, I got error
saying that tkinter cannot find the $DISPLAY.

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.4/dist-packages/matplotlib/pyplot.py", line
535, in figure
**kwargs)
File
"/usr/local/lib/python3.4/dist-packages/matplotlib/backends/backend_tkagg.py",
line 84, in new_figure_manager
return new_figure_manager_given_figure(num, figure)
File
"/usr/local/lib/python3.4/dist-packages/matplotlib/backends/backend_tkagg.py",
line 92, in new_figure_manager_given_figure
window = Tk.Tk()
File "/usr/lib/python3.4/tkinter/__init__.py", line 1859, in __init__
self.tk = _tkinter.create(screenName, baseName, className, interactive,
wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable

Some people on the Internet suggested adding matplotlib.use('Agg') at the
beginning of the notebook, but it still does not work for me.

-- 


Thanks,
David S.

Reply via email to