Py2exe: the exe is created but if you run it you get a Runtime error R6034

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-01 07:32:30

问题


I have made an application in wxpython, and I want to make it executable. All goes ok. All dlls needed are there, but when I try to run my exe I get the following error:

Runtime error R6034, An application has made an attempt to load C runtime library incorrectly.


回答1:


I had this same problem, I fixed it by ADDING this text to the "manifest_template" string in setup.py (the advanced sample uses it)

<dependency>
<dependentAssembly>
    <assemblyIdentity
        type="win32"
        name="Microsoft.VC90.CRT"
        version="9.0.30729.4918"
        processorArchitecture="X86"
        publicKeyToken="1fc8b3b9a1e18e3b"
        language="*"
    />
</dependentAssembly>




回答2:


I've not had that issue. All my wxPython applications can be packaged into an EXE with no issues as long as I include the Microsoft DLLs. If you haven't already, make sure you set the bundle option to 3 instead of 1. I've had strange issues when using option 1. Also try running Dependency Walker on the generated EXE to see if it finds anything missing: http://www.dependencywalker.com/



来源:https://stackoverflow.com/questions/9793742/py2exe-the-exe-is-created-but-if-you-run-it-you-get-a-runtime-error-r6034

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!