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
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.