Never mind, I found the problem. I was doing: python -m compile.py I really should have been doing: python compile.py The description of -m is confusing in the documentation, what does it really do?