 <p>For this very reason it is recommend that you change your shebang line to be more path agnostic:</p> <pre><code>#!/usr/bin/env python </code></pre> <p>See <a href="http://mail.python.org/pipermail/tutor/2007-June/054816.html" rel="nofollow">this mailing list message</a> for more information:</p> <blockquote> <p>Consider the possiblities that in a different machine, python may be installed at <code>/usr/bin/python</code> or <code>/bin/python</code> in those cases, <code>#!/usr/local/bin/python</code> will fail. For those cases, we get to call the <code>env</code> executable with argument which will determine the arguments path by searching in the <code>$PATH</code> and use it correctly.</p> <p>(<code>env</code> is almost always located in <code>/usr/bin/</code> so one need not worry that <code>env</code> is not present at <code>/usr/bin</code>.)</p> </blockquote>