Luke Lee

Software Engineer

Web + Desktop + Science

Fork me on Github

Verbose Python

Ever wonder what happens when you try to import a third-party module? Sometimes it's useful to know exactly where the Python interpreter is looking and what happens. I sometimes get curious about this or end up debugging some weird missing import, etc.

The solution: python -v

This runs the interpreter in verbose mode to trace imports. You can even specify it multiple times to increase the verbosity, python -v -v will give even more information.

Published: 06-15-2012 16:27:00