title: py2exe: building executable hangs
body: <p>I'm currently trying to use <code>py2exe</code> to compile a large project into a Windows executable for easy redistribution.  Before tackling this large project, I wanted to make some first steps.  This is my <code>test.py</code> script</p>
  
  <pre><code>print("Hello World!")
  </code></pre>
  
  <p>and this is my <code>setup.py</code></p>
  
  <pre><code>from distutils.core import setup
  import py2exe
  
  setup(console=['test.py'])
  </code></pre>
  
  <p>just as described in the <a href="http://www.py2exe.org/index.cgi/Tutorial" rel="nofollow"><code>py2exe</code> Tutorial</a>.</p>
  
  <p>Now I enter in the command prompt (<code>cmd.exe</code>)</p>
  
  <pre class="lang-none prettyprint-override"><code>&gt; python setup.py py2exe
  running py2exe
  </code></pre>
  
  <p>and that's it.  It now <em>hangs</em> at <code>running py2exe</code> (<a href="http://www.py2exe.org/index.cgi/Tutorial#Step3" rel="nofollow">This</a> is the expected output).  When I try to Ctrl-C out of it, I enter an infinite loop of</p>
  
  <pre class="lang-none prettyprint-override"><code>Traceback (most recent last call):
    File "_ctypes/callbacks.c", line 234, in 'calling callback function'
    File "C:\Anaconda3\lib\site-packages\py2exe\dllfinder.py", line 92, in status_routine
      @_wapi.PIMAGEHELP_STATUS_ROUTINE
  KeyboardInterrupt
  </code></pre>
  
  <p>where repeated Ctrl-C duplicates this error message.  I have to kill the <code>python.exe</code> process in <code>taskmgr</code> to quit.</p>
  
  <hr>
  
  <p>My setup is</p>
  
  <ul>
  <li>Windows 7 Professional N 64-bit (Build 7601; Service Pack 1)</li>
  <li><a href="https://www.continuum.io/downloads" rel="nofollow">Anaconda Windows 64-bit Python</a></li>
  <li><a href="https://anaconda.org/pypi/py2exe" rel="nofollow">PyPI <code>py2exe</code> 0.9.2.0</a> (installed with <code>pip install -i https://pypi.anaconda.org/pypi/simple py2exe</code>)</li>
  </ul>
  
  <p>This is my first time developing software on Windows, so I have no idea how to debug or otherwise troubleshoot things.</p>
  
  <hr>
  
  <p>Related questions:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/37406228">Why does py2exe stop at “running”?</a> (Very related, but no usable answer)</li>
  </ul>