title: PyInstaller: Single-file executable doesn't run
body: <p>I'm trying to create a single-file executable for Windows from a Python  application, using <code>pyinstaller</code>.</p>
  <p>I downloaded the experimental Python 3 branch of <code>pyinstaller</code> from <a href="https://github.com/pyinstaller/pyinstaller/wiki" rel="noreferrer">here</a> (the file was <a href="https://github.com/pyinstaller/pyinstaller/archive/python3.zip" rel="noreferrer">python3.zip</a>, but the link is now dead). And I installed it using <code>python setup.py install</code>.</p>
  <p>Then I created a test python script called <code>test.py</code>, with the following content:</p>
  <pre><code>print('Hello, World!')
  </code></pre>
  <p>Afterwards, I ran the following command to create a single-file executable:</p>
  <pre><code>pyinstaller --onefile test.py
  </code></pre>
  <p>The command succeeded, and I verified that the file <code>dist/test.exe</code> had been generated. However, when I try to run it, all I get is an empty console window. Nothing ever appears, and the program never terminates. It just hangs there forever, until I force close it.</p>
  <p><img src="https://i.stack.imgur.com/kW4MX.png" alt="I get an empty console window." /></p>
  <p>Calling <code>pyinstaller test.py</code> (without the <code>--onefile</code> option) works fine. So what <em>is</em> the problem?</p>
  <p>Notice that using <code>py2exe</code> or <code>cx_freeze</code> is not an option. It has to be <code>pyinstaller</code>.</p>
  <p><strong>UPDATE:</strong> I just tested it under Python 2 (using the normal PyInstaller version), and I ran into the same problem. So, this is not just a Python 3 problem.</p>