On Mon, Jan 26, 2009 at 11:12 AM, Linda Chen <ch...@mit.edu> wrote: > > Dear John Hunter, > > Thanks for your response. Here is what I get: > > C:\Documents and Settings\Linda\Desktop\python>dir > Volume in drive C is WinXP > Volume Serial Number is 543D-51FE > > Directory of C:\Documents and Settings\Linda\Desktop\py > > 01/24/2009 04:34 PM <DIR> . > 01/24/2009 04:34 PM <DIR> .. > 01/21/2009 10:58 PM 89 data.dat > 01/20/2009 02:28 PM 1,001 fileout.py > 01/14/2009 04:15 PM 32 first.py > 01/24/2009 04:34 PM 130 rand.dat > 01/16/2009 03:21 PM 562 random.py > 01/21/2009 10:01 PM 818 random.pyc > 01/21/2009 02:44 PM 478 random1.py > 01/23/2009 04:43 PM 344 readdata.py > 01/21/2009 11:29 PM 315 readdata.py~ > 01/24/2009 04:34 PM 21 readdatatest.py > 01/24/2009 04:34 PM 344 readdatatest.py~ > 01/21/2009 10:58 PM 11 test.dat > 12 File(s) 4,145 bytes > 2 Dir(s) 17,915,678,720 bytes free > > C:\Documents and Settings\Linda\Desktop\python>
OK, the problem is that you have a python file called random.py in the folder you are trying to run pylab from. random is a module that is part of the python standard library, and matplotlib depends upon it.. When one of the matplotlib dependencies tries to import random, it sees your random.py file rather than the one that ships with python, because the module search path checks the local dir first. You need to either remove or rename the file, or run pylab from another directory. In general, it is good practice to avoid naming files or modules after one of the python standard library modules. You can find a list here: http://docs.python.org/library/ JDH ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users