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.

[Matplotlib-users] Web & matplotlib

2011-11-14 Thread Paul de Beurs
Hey, I work with Mac OSX 10.7.2 I have a probleem. From the IDLE this little program works fine: #!/usr/bin/python import numpy import matplotlib print "Content-Type: text/plain\n" print matplotlib.__version__ The output is: Content-Type: text/plain 1.1.0 Starting this program from MAMP gives m