[SciPy-user] The baffling behavior that just won't die

David Goldsmith d_l_goldsmith@yahoo....
Sun Jul 5 22:19:45 CDT 2009

Hi, folks.  I'm having a problem using numpy.lookfor() that is very reminiscent of this thread:


The simplest reproduction of the problem is illustrated thusly:

c:\Python25\Lib\site-packages\numpy>dir random.py
 Volume in drive C is SQ004816V03
 Volume Serial Number is 8E67-90B7

 Directory of c:\Python25\Lib\site-packages\numpy

File Not Found

Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> 'lookfor' in dir(np)
>>> help(np.lookfor)
cannot import name Random

And that's all she wrote.  

I read the thread cited above and it led me to examine the goings-on using python -v; as warned, there was a waterfall of imports, but at the end of it all was:
# C:\Python25\lib\repr.pyc matches C:\Python25\lib\repr.py
import repr # precompiled from C:\Python25\lib\repr.pyc
import collections # builtin
# C:\Python25\lib\tempfile.pyc matches C:\Python25\lib\tempfile.py
import tempfile # precompiled from C:\Python25\lib\tempfile.pyc
import random # directory random
# random\__init__.pyc matches random\__init__.py
import random # precompiled from random\__init__.pyc
# random\info.pyc matches random\info.py
import random.info # precompiled from random\info.pyc
import random.mtrand # dynamically loaded from random\mtrand.pyd
cannot import name Random

Please help.  Thanks!



More information about the SciPy-user mailing list