A common problem when creating an executable file in Windows 7 and deploying to Windows XP.
According to the py2exe tutorial, you need to enable the MVC DLL. But the tutorial is out of date, and the script is given a search in only one directory. Previously, the directory contained the entire DLL and manifest, but currently it contains only the DLL. You need to specify a different directory for the manifest file. If you do not, you will have this error:
this application has failed to start because the application configuration is incorrect
If you are using 64-bit versions of Windows 7, you will need the Microsoft Visual C runtime DLL. Do not forget the manifest, which is not in the same directory in Windows 7. You need to adapt the script as follows:
data_files = [("VC90", glob(r'C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f91\*.*')), ("VC90", glob(r'C:\Windows\winsxs\Manifests\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f91.manifest')) ] setup( data_files=data_files, console = [{'script': "C:\test\my_program.py"}], zipfile = None, )
Now you can expand the "dist" directory containing all the files and dependencies.
Gagou source share