Understand what the ImportError error is

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rimj09
    New Member
    • Aug 2007
    • 1

    Understand what the ImportError error is

    I have recently received a Python program that I'm not able to compile. I read some tutorial but the error note doesn't make sense.
    The program starts with
    from Numeric import *
    from FFT import *
    from LinearAlgebra import *
    from scipy import *
    from CsvUtils import *
    from math import log
    from math import atan
    from os.path import *
    from string import *
    from Scientific.Func tions.Interpola tion import *
    from real import *

    But when I try to compile it ( run module) the error says:
    Traceback (most recent call last):
    File "/Users/reemjaafar/Desktop/Python/InternalMagneti cField2-DerivativeResul t.py", line 1, in <module>
    from Numeric import *
    ImportError: No module named Numeric


    So it is not recognizing the Numeric module, shouldn't that be already in the library of Phyton?
  • ilikepython
    Recognized Expert Contributor
    • Feb 2007
    • 844

    #2
    Originally posted by rimj09
    I have recently received a Python program that I'm not able to compile. I read some tutorial but the error note doesn't make sense.
    The program starts with
    from Numeric import *
    from FFT import *
    from LinearAlgebra import *
    from scipy import *
    from CsvUtils import *
    from math import log
    from math import atan
    from os.path import *
    from string import *
    from Scientific.Func tions.Interpola tion import *
    from real import *

    But when I try to compile it ( run module) the error says:
    Traceback (most recent call last):
    File "/Users/reemjaafar/Desktop/Python/InternalMagneti cField2-DerivativeResul t.py", line 1, in <module>
    from Numeric import *
    ImportError: No module named Numeric


    So it is not recognizing the Numeric module, shouldn't that be already in the library of Phyton?
    No, Numeric is not in the standard python libaray, you need to download it seperately. Try this link.

    Comment

    • bartonc
      Recognized Expert Expert
      • Sep 2006
      • 6478

      #3
      Originally posted by ilikepython
      No, Numeric is not in the standard python libaray, you need to download it seperately. Try this link.
      Great link! Numeric is out of date. I'm not sure if NumPy translates Numeric imports or if you change "import numeric" to[CODE=python]import numpy[/CODE].

      Comment

      Working...