scipy code runs in empty directory, not another

Beliavsky beliavsky at
Sat Nov 13 14:52:26 CET 2010

After installing numpy, scipy, and matplotlib for python 2.6 and
running the code from
(stored as in a directory with other python codes, I got
the error messages

Traceback (most recent call last):
  File "", line 3, in <module>
    from pylab import *
  File "c:\python26\lib\site-packages\", line 1, in <module>
    from matplotlib.pylab import *
  File "c:\python26\lib\site-packages\matplotlib\", line
133, in <module>
    import sys, os, tempfile
  File "c:\python26\lib\", line 34, in <module>
    from random import Random as _Random
  File "C:\python\code\mycode\", line 1, in <module>
    from RandomArray import standard_normal
  File "C:\python\code\mycode\", line 1, in <module>
    import ranlib
ImportError: No module named ranlib

When I create a new directory, copy there, and run, the
program works. Can someone explain why other files are "interfering"
in the first case? Thanks.

More information about the Python-list mailing list