I used this link to configure my client computer. I was using ipython. For ipython, while starting with it, I run command as:
ipython --pylab %sets up graphics for plotting
This works for me now.
Question
I am facing a problem of not able to display image with the following command:
from skimage import io
io.imshow('abc.png')
It shows following error:
/usr/lib/pymodules/python2.7/matplotlib/backends/backend_tkagg.pyc in new_figure_manager(num, *args, **kwargs)
78 FigureClass = kwargs.pop('FigureClass', Figure)
79 figure = FigureClass(*args, **kwargs)
---> 80 window = Tk.Tk()
81 canvas = FigureCanvasTkAgg(figure, master=window)
82 figManager = FigureManagerTkAgg(canvas, num, window)
/usr/lib/python2.7/lib-tk/Tkinter.pyc in __init__(self, screenName, baseName, className, useTk, sync, use)
1686 baseName = baseName + ext
1687 interactive = 0
-> 1688 self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
1689 if useTk:
1690 self._loadtk()
TclError: no display name and no $DISPLAY environment variable
I am running this in remote server. In the server, I found the DISPLAY variable is not set. How do I set the display variable to display the image.
Solution
I used this link to configure my client computer. I was using ipython. For ipython, while starting with it, I run command as:
ipython --pylab %sets up graphics for plotting
This works for me now.