py2exe打包出现"应用程序配置不正确,应用程序未启动" 解决方案

msvcr90.dll版本不一致。py2exe打包的程序须要9.0.21022.8这个版本号的MSVCR90.DLLspa

除了9.0.21022.8这个版本号的MSVCR90.DLL以外,咱们还须要一个Microsoft.VC90.CRT.manifest文件放在同一目录下:xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>it

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">io

<noInheritable></noInheritable>asm

<assemblyIdentity type="win32" name="Microsoft.VC90.CRT" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>table

<file name="msvcr90.dll"/>打包

</assembly>coding

以后运行py2exe打包后的exe文件就没问题了。file