I have an application which I am trying to pack it with py2exe.
This application fisrt runs some computation operations, then output the results in a dialog.
When I run it in Python, the code works just fine, and the dialog and other components are displayed as I expected.
Then I used Py2exe to pack it into a .exe file, and run it. The conversion goes well without error report, the computation part works, but the graphical output doesn't. There should be a dialog displayed. Instead, I only see a tiny window flashed and disappeared. I think this window is for error report of wxPython.
Here is the setup.py I have:
import csv import numpy as np import sys import xlwt import wx from AccountClass import Account from NodeClass import Node from TreeClass import Tree from MonteCarloClass import MonteCarloSimulator # I put down this line to deal with the dll missing problem sys.path.append('C:\\WINDOWS\\WinSxS\\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4148_none_5090ab56bcba71c2') from distutils.core import setup import py2exe setup(console = ['main.py']) May I know why this is happening? Is this because the wxPython doesn't work with py2exe, or I didn't configure them correctly?
wxPythonworks just fine withpy2exe. Can you elaborate on your 'missing dll' problem? I never encountered the need to append an SxS path to the system path in order for bundle an executable using py2exe. My guess is that whatever you were working around with this "fix" is related to the underlying cause for your issue, but I'll need more background to help.dll missing problemis from this link:stackoverflow.com/questions/323424/…excludecommand in the options, then it turns out that only abuildfolder is created, and no.exefile is generated.distfolder which includes.exefile. However, again a small window pops up and disappear in a flash.__name__ == '__main__'block will be relevant. Are you calling your executable from a command line, or double-clicking on it? Is there amain.exe.logfile generated in the dist directory?