title: py2exe with Numpy/Scipy and Matplotlib DLL load fail
body: <p>I have a script that generates some plots that I would like to run generate an executable for so some friends who can't deal with CLI can use it. However the problem is that py2exe will compile simple scripts such as <code>print 'hello world'</code>, but when trying to include <code>matplotlib</code> and <code>numpy</code> I have issues.</p>
  
  <pre><code>import sys
  import numpy as np
  import inspect
  import itertools
  from pylab import *
  from matplotlib import pyplot as plt
  </code></pre>
  
  <p>Those are all of the modules that the script requires and here is the py2exe error:</p>
  
  <pre><code>*** searching for required modules ***
  *** parsing results ***
  Traceback (most recent call last):
    File "setup.py", line 26, in &lt;module&gt;
      data_files=matplotlib.get_py2exe_datafiles(),)
    File "C:\Python27\lib\distutils\core.py", line 152, in setup
      dist.run_commands()
    File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
      self.run_command(cmd)
    File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
      cmd_obj.run()
    File "C:\Python27\lib\site-packages\py2exe\build_exe.py", line 243, in run
  self._run()
    File "C:\Python27\lib\site-packages\py2exe\build_exe.py", line 299, in _run
      py_files, extensions, builtins = self.parse_mf_results(mf)
    File "C:\Python27\lib\site-packages\py2exe\build_exe.py", line 1095, in parse_
  mf_results
      import Tkinter
    File "C:\Python27\lib\lib-tk\Tkinter.py", line 38, in &lt;module&gt;
      import FixTk
    File "C:\Python27\lib\lib-tk\FixTk.py", line 65, in &lt;module&gt;
      import _tkinter
  ImportError: DLL load failed: %1 is not a valid Win32 application.
  </code></pre>
  
  <p>Which was generated after calling <code>python setup.py py2exe</code> with the file <code>setup.py</code> defined as:</p>
  
  <pre><code>from distutils.core import setup
  import py2exe
  import sys
  from glob import glob
  data_files = [("Microsoft.VC90.CRT", glob(r'C:\Python27\Microsoft.VC90.CRT\*.*'))]
  sys.path.append("C:\\Python27\\Microsoft.VC90.CRT")
  setup(
      data_files=data_files,
      console = ['sequence-entropy.py']
    )
  </code></pre>
  
  <p>I've put the VC redist stuff in my the directory listed in <code>setup.py</code>.
  The script runs and generates plots when run by CLI on my windows machine (not just the system it was written on). I've included the VC stuff, I'm not sure what is going on.</p>