On Monday 24 March 2008 01:52:27 pm Brook Lin wrote: > After installation, I only ran a simple code attached below. I found that I > got this run time error from "from pylab import *". > > I did go through what Mark Hamilton posted: > Index: cutils.py > =================================================================== > --- cutils.py (revision 5001) > +++ cutils.py (working copy) > @@ -79,7 +79,7 @@ > raise RuntimeError("""\ > '%s' is not a writable dir; you must set %s/.matplotlib to be a writable > dir. > You can also set environment variable MPLCONFIGDIR to any writable > directory > -where you want matplotlib data stored """%h) > +where you want matplotlib data stored """%(p,h)) > else: > if not is_writable_dir(h): > raise RuntimeError("Failed to create %s/.matplotlib; consider > setting MPLCONFIGDIR to a writable directory for matplotlib configuration > data"%h) > > I changed where you want matplotlib data stored """%h) into where you want > matplotlib data stored """%(p,h)). However, I got the same error after > changes. Did I do right?
Sorry, cutils.py is a part of a new config package we have been working on, which ships with matplotlib but is not activated. I think you need to edit your matplotlib/__init__.py instead, just make the same changes. Once that change is made, and you try to import pylab, you should get a RunTimeError telling you that matplotlib can't create the directory, either because the path doesnt exist, or it exists but you cant write to it. At that point you can set your MPLCONFIGDIR environment variable to point somewhere writeable, and if it seems like a bug that matplotlib is trying to create a directory somewhere nonsensical, please let us know. > I install matplotlib by: > python setup.py build > python setup.py install > How can I install it by svn trunk? The following should be on one line: ---- svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/matplotlib matplotlib ---- then cd into the new directory and install in the usual way. Darren ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users