ImportError: No module named Numeric

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Saad Bin Ahmed
    New Member
    • Jul 2011
    • 25

    ImportError: No module named Numeric

    Hi,

    If somebody knows about the following error then please guide me how can I rectify this error.

    File "arabic_offline .py", line 3, in <module>
    from Numeric import *
    ImportError: No module named Numeric

    Thanks in advance,
  • Oralloy
    Recognized Expert Contributor
    • Jun 2010
    • 988

    #2
    try

    from math import *

    I think you're going for the libraries, and not a special module you wrote, yes?

    Luck!
    Oralloy

    Comment

    • Saad Bin Ahmed
      New Member
      • Jul 2011
      • 25

      #3
      I have done it by

      sudo apt-get install python-numeric

      but now another error occurs which shows the error message as follows


      from NetCDF import *
      ImportError: No module named NetCDF

      Although I have installed netcdf-4.6.1 but this error is still there. If you have an idea how to remove then please share it.

      Comment

      • dwblas
        Recognized Expert Contributor
        • May 2008
        • 626

        #4
        There are two possibilities
        1. The name is incorrect. Search for "netcdf" on the system, (make sure the search is not case specific), and see if you should be importing "NetCDF" or "netcdf" or "Netcdf", etc.

        2. The library is not installed in /usr/lib/python. Once again a search is necessary to tell you where it is. You can move it, symlink it, or use sys.path.append to append it's directory so Python knows where to look.

        Comment

        • Saad Bin Ahmed
          New Member
          • Jul 2011
          • 25

          #5
          Yes I have done it !
          the second possibility dwblas mentioned is the case with my program. Actually the path of Netcdf was not recognizing

          echo $PATH~ (to see the current path)
          export PATH
          PATH=$PATH:~/your/specified/path

          Comment

          Working...