Matplotlib raises this error when I import it as a CGI program:
RuntimeError: '/var/www' is not a writable dir; you must set
environment variable HOME to be a writable dir
I am a non-root user, and the Apache user's HOME =/var/www, so CGI
script raises an exception when that directory isn't writeable. There
is nothing to be done about the Apache users's environment variables,
or the writablity of that directory, as a non-root user
It appears that matplotlib checks the HOME environment variable, then
the MATPLOTLIBDATA variable, and then goes on to check the
matplotlibrc starting with the current directory. But it raises an
exception if the home directory isn't writeable without checking the
rc file to see if the datapath inside it would work?
Is there a way to either prevent matplotilb from checking for HOME,
and go straight to the local matplotlibrc, or alternately have it
check the matplotlibrc if the HOME directory isn't writable?