Re: [Matplotlib-users] Web & matplotlib

2011-11-16 Thread Daryl Herzmann
Hello, For what it is worth, I do the folllowing on my matplotlib scripts run from apache on RHEL6. import os os.environ[ 'HOME' ] = '/tmp/' os.environ[ 'USER' ] = 'nobody' import matplotlib matplotlib.use( 'Agg' ) This seems to keep matplotlib from bombing out when it attempts to read dot file

Re: [Matplotlib-users] Web & matplotlib

2011-11-14 Thread Michael Droettboom
I'm not sure what MAMP is. Usually this problem is because matplotlib is trying to import a GUI toolkit and the windowing environment is not available from the web server. Try setting the matplotlib backend to "Agg", by putting this at the top of the file: import matplotlib matplotlib.