Hello all When I try doing a "from Numeric import *" at the Python command line I get the error message "ImportError: No module named Numeric" so obviously the module is not in the path known to command line Python. However when the same import statement is part of a Python script file the module is found correctly. How do I fix this? Is there a way to give the full path within the import statement (when I try I get a syntax error message)? Thanks, Daniel
Daniel Sheltraw wrote:
Hello all
When I try doing a "from Numeric import *" at the Python command line I get the error message "ImportError: No module named Numeric" so obviously the module is not in the path known to command line Python. However when the same import statement is part of a Python script file the module is found correctly. How do I fix this?
Are you sure that the Python interpreter is the same in both instances? Print sys.path before importing in both instances to see what paths are being searched.
Is there a way to give the full path within the import statement (when I try I get a syntax error message)?
Not really, no. -- Robert Kern rkern@ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter
participants (3)
-
Alan G Isaac
-
Daniel Sheltraw
-
Robert Kern