I get an ImportError
exception somewhere in the code, but the same module can be imported safely at startup of the application. I'm curious to see which paths Python looks for modules to import, so that I can trace why this problem occurs. I found this:
print sys.path
Is this the list of ALL paths that system looks when tries to import a module?
The path locations that python checks by default can be inspected by checking sys.path
.
import sys
print(sys.path)