ich versuchte unter linux ein png mit einem linien Diagramm zu erstellen. Jedoch benötigt matplotlib ein DISPLAY gesetzt. Nun habe ich folgende Seite gefunden die erklärt wie man das ganze ohne GUI zum laufen bekommt http://www.dalkescientific.com/writings ... t_gui.html.
Mein Problem ist jetzt nur das ich die Datei setup.cfg nirgends am System habe, obwohl python-matplotlib installiert ist.
Weiß jemand wo man das mit der GUI noch ausschalten/deaktivieren kann, der gesagte PC/Server keinen Monitor besitzt.
Beispiel beim Ausführen eines Scripts:
Code: Alles auswählen
Traceback (most recent call last):
File "./barchart_demo.py", line 3, in <module>
import matplotlib.pyplot as plt
File "/usr/lib/python2.5/site-packages/matplotlib/pyplot.py", line 37, in <module>
new_figure_manager, draw_if_interactive, show = pylab_setup()
File "/usr/lib/python2.5/site-packages/matplotlib/backends/__init__.py", line 24, in pylab_setup
globals(),locals(),[backend_name])
File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_gtkagg.py", line 10, in <module>
from matplotlib.backends.backend_gtk import gtk, FigureManagerGTK, FigureCanvasGTK,\
File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_gtk.py", line 7, in <module>
import gtk; gdk = gtk.gdk
File "/usr/lib/python2.5/site-packages/gtk-2.0/gtk/__init__.py", line 79, in <module>
_init()
File "/usr/lib/python2.5/site-packages/gtk-2.0/gtk/__init__.py", line 67, in _init
_gtk.init_check()
RuntimeError: could not open display
Wenn ich nun das DISPLAY setze würde es gehen, jedoch brauche ich das GUI* nicht von der Console
Lg NoRulez