[SciPy-user] Problems installing SciPy

Robert Kern robert.kern at gmail.com
Wed Mar 22 14:19:55 CST 2006

Tommy Grav wrote:
> I am new to Python and just downloaded ActivePython on my Mac
> PPC with OS X 10.4.
> I added the numpy package (0.9.6-py2.4) and it imports fine. But when I
> try to import scipy (0.4.8-py2.4)
> I get an error:
>>>> import scipy
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File
> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/__init__.py",
> line 32, in ?
>     from numpy import *
>   File
> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/numpy/f2py/__init__.py",
> line 6, in ?
>     import tempfile
>   File
> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/tempfile.py",
> line 33, in ?
>     from random import Random as _Random
> ImportError: cannot import name Random
> importing random works fine, so I don't understand what the problem is.
> Can anyone provide any clues?

tempfile.py is looking for the standard library's random.py module. I'll bet
that the directory you are in has its own random module that is getting imported

Robert Kern
robert.kern at gmail.com

"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