[SciPy-user] problems with python and numpy

Robert Kern robert.kern@gmail....
Sat Jun 21 18:39:30 CDT 2008


On Sat, Jun 21, 2008 at 11:54, Mike Conroy <mconroy@uga.edu> wrote:
> All- I am having some baffling conflicts between python and numpy that
> seem to have arisen in recent installation. These seem to center around
> the tempfile in the Python Lib
> directory.
>
> What happens is that when I open python in an directory other than c:\
> or perhaps c:\python25, and then attempt to load numpy (or pymc which
> also loads numpy) I get:
> the following error from tempfile.py
> "from random import Random as _Random   ImportError: cannot import name
> Random"
>
> Because things work fine in C:\ and some other directories, I am betting
> this is a path issue. Here is my path in case anyone sees the issue>

You almost certainly have a module named random.py in the directories
where you see the problem. Python looks in the current directory for
modules to import before standard directories like c:\Python25\Lib
where the desired random.py module is.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
 -- Umberto Eco


More information about the SciPy-user mailing list