[Numpy-discussion] ImportError: No module named Numeric

David M. Cooke cookedm at physics.mcmaster.ca
Mon Jun 13 12:12:42 EDT 2005

Darren Thompson <thompson at chemistry.ucsc.edu> writes:

> Hi,
>      I know I have Numeric installed correctly because
> Python 2.3.5 (#1, Jun 13 2005, 10:59:48)
> [GCC 4.0.0 20041026 (Apple Computer, Inc. build 4061)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
>  >>> import Numeric
>  >>>

Where is it installed? What does Numeric.__file__ give you?

> but
> Welcome to Aria version 2.0alpha.
> Traceback (most recent call last):
>    File "/usr/local/aria/aria2.0/aria2.py", line 770, in ?
>      from aria import AriaBaseClass
>    File "/usr/local/aria/aria2.0/src/py/aria.py", line 60, in ?
>      from TypeChecking import *
>    File "/usr/local/aria/aria2.0/src/py/TypeChecking.py", line 15, in ?
>      from Numeric import zeros as _zeros
> ImportError: No module named Numeric
> Is there a way to make python module numeric permanent?

Check that you're using the same python to run your Aria code as you are when
you checked importing Numeric.

Also, the fact that this code is in /usr/local/aria/aria2.0, which is
not in the default sys.path, means something along the way is doing
something to sys.path, and maybe it did it wrong. Put an 'import sys;
print sys.path' on the line before the 'from Numeric ...' to see
what's going on. Compare the output to see if the directory that
Numeric sits in is in there.

|David M. Cooke                      http://arbutus.physics.mcmaster.ca/dmc/
|cookedm at physics.mcmaster.ca

More information about the NumPy-Discussion mailing list