[SciPy-user] scipy import problem when running from terminal

David Vine djvine@gmail....
Sun May 3 18:10:51 CDT 2009


when I execute my python scripts from the terminal (ubuntu 9.04) the
scipy module cannot be found when i try to import it and i get an
ImportError exception. However I am confident that the scipy module is
installed correctly because calling the same script from within IPython
using execfile has no problem finding the scipy module.

To be specific, the following code:


import scipy as sp

def main():
    m = scipy.zeros((100))
    return 0

if __name__ == '__main__':

will execute to completion under IPython. However, calling it from the
command line in a terminal with:
> python test.py

gives the exception
> import scipy as sp

> ImportError: No module named scipy

I cannot figure out why? Any help would be appreciated.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20090504/90c6d36e/attachment.html 

More information about the SciPy-user mailing list