import fails in non-interactive interpreter

Brian brian.brinegar at
Wed Jan 25 21:25:41 EST 2012

I've been banging my head against this for the past hour, and I'm
hoping someone here can set me straight.

I have a virtualenv setup for a Pyramid app and I'm having trouble
importing the paste.deploy module in a standalone, non-Pyramid script
within the virtualenv.

For testing purposes I have a one line "" file:

from paste.deploy import appconfig

> python
ImportError: No module named paste.deploy

but, using the same same python, I'm able to import the module from
the interactive interpreter. The PATH and PYTHONPATH environment
variables are identical in both contexts.

Under what situations would a module be available to through the
interactive interpreter but not the non-interactive?

I greatly appreciate any thoughts,

More information about the Python-list mailing list