What can prevent a working (when "opened with" Python) Python application from starting by double-click?
<p>A Python application (having a permission to be executed by the user) doesn't start with double click on it. If I run it (directly, by <code>./theapp.pyw</code>) in terminal I get ": No such file or directory" error (while there is no such a string in the application code and the file surely exists (renaming it and using a different name results in the same)).</p>

<p>But If I explicitly open it with Python (by issuing <code>python ./theapp.pyw</code> or right-clicking and choosing to open with Python 2.7) it works just fine.</p>

<p>The first line of the file says</p>

<pre><code>#!/usr/bin/env python
</code></pre>

<p>Issuing "/usr/bin/env python" command launches Python 2.7 console.</p>

<p>The OS is XUbuntu Linux 11.10. The only Python installed is Ubuntu's default 2.7.</p>

<p>Any ideas?</p>
