|
From: Benjamin R. <ben...@ou...> - 2012-08-16 20:54:29
|
On Thu, Aug 16, 2012 at 4:26 PM, Liang Wang <fra...@gm...> wrote: > Hi everyone. I have trouble to find a usable background on a remote server > where I do not have root privilege. Unfortunately, there is no backend > available: > > Tkinter: no > * Using default library and include directories for > * Tcl and Tk because a Tk window failed to open. > * You may need to define DISPLAY for Tk to work so > * that setup can determine where your libraries are > * located. Tkinter present, but header files are > not > * found. You may need to install development > * packages. > Gtk+: no > * Building for Gtk+ requires pygtk; you must be > able > * to "import gtk" in your build/install > environment > Mac OS X native: no > Qt: no > Qt4: no > PySide: no > Cairo: no > > The output of a simple script is > ================== > simple_plot.py: > # > from pylab import * > plot([1,2,3]) > show() > # > python simple_plot.py --verbose-helpful > output.txt > ================== > $HOME=/ccs/home/user1 > CONFIGDIR=/ccs/home/user1/.matplotlib > matplotlib data path > /ccs/home/user1/.local/lib/python2.7/site-packages/matplotlib-1.1.0-py2.7-linux-x86_64.egg/matplotlib/mpl-data > loaded rc file > /ccs/home/user1/.local/lib/python2.7/site-packages/matplotlib-1.1.0-py2.7-linux-x86_64.egg/matplotlib/mpl-data/matplotlibrc > matplotlib version 1.1.0 > verbose.level helpful > interactive is False > platform is linux2 > Using fontManager instance from /ccs/home/user1/.matplotlib/fontList.cache > backend agg version v2.2 > > When I tried to install pygtk, it requires glib, which is missing, and I > just did not digg further. So, is there any workaround that I can get ANY > backend to work (to show images on screen). > > > Any suggestions will be greatly appreciated (I really want to get things > to work). > > Regards, > Liang > > The Agg backend is always available for non-interactive plotting. In other words, you won't be able to do a show() call, but you can save to any of the image formats. The TkAgg backend should also be an option (unless that python was built without Tk, which is rare). Often, if Tk isn't working, it is a simple matter of setting your display environment correctly. Most of the time, simply passing the "-X" option to ssh is sufficient (assuming you are sshing from a linux box). Otherwise, I think you have to mess around with your DISPLAY environment variable on the remote server (I think it is usually ":0.0", but I am no expert on this. I hope that helps! Ben Root |