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>

Thanks,
Linda.
-----Original Message-----
From: John Hunter [mailto:jdh2...@gmail.com] 
Sent: Sunday, January 25, 2009 9:38 PM
To: ch...@mit.edu
Cc: matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] import pylab problem

On Sat, Jan 24, 2009 at 3:38 PM, Linda Chen <ch...@mit.edu> wrote:
> Dear matplotlib-users,
>
> I'm having trouble importing pylab and I hope someone can help me. The
error
> message is:
>
>
>
> Microsoft Windows XP [Version 5.1.2600]
> (C) Copyright 1985-2001 Microsoft Corp.
>
> C:\Documents and Settings\Linda>cd desktop\python
>
> C:\Documents and Settings\Linda\Desktop\python>python readdata.py
> Traceback (most recent call last):
>  File "readdata.py", line 1, in <module>
>    import pylab
>  File "C:\Python25\Lib\site-packages\pylab.py", line 1, in <module>
>    from matplotlib.pylab import *
>  File "C:\Python25\Lib\site-packages\matplotlib\__init__.py", line 127, in
> <mod
> ule>
>    import sys, os, tempfile
>  File "C:\python25\lib\tempfile.py", line 33, in <module>
>    from random import Random as _Random
> ImportError: cannot import name Random
>


Any chance there is a directory named "random" in the directory from
which you are running python, eg what does "dir" show right before you
run python?  For example, see

http://www.mail-archive.com/numpy-discuss...@scipy.org/msg14644.html

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

Reply via email to