py2exe: Compiled Python Windows Application won't run because of DLL

前端 未结 2 1148
被撕碎了的回忆
被撕碎了的回忆 2021-02-06 11:30

I will confess I\'m very new to Python and I don\'t really know what I\'m doing yet. Recently I created a very small Windows application using Python 2.6.2 and wxPython 2.8. And

相关标签:
2条回答
  • 2021-02-06 12:08

    You can't just copy msvcr*.dll - they need to be set up using the rules for side-by-side assemblies. You can do this by installing the redistributable package as Sam points out, or you can put them alongside your executables as long as you obey the rules.

    See the section "Deploying Visual C++ library DLLs as private assemblies" here: How to Deploy using XCopy for details, but basically your application looks like this:

    c:\My App\MyApp.exe
    c:\My App\Microsoft.VC90.CRT\Microsoft.VC90.CRT.manifest
    c:\My App\Microsoft.VC90.CRT\msvcr90.dll
    

    One benefit of this is that non-admin users can use your app (I believe you need to be an admin to install the runtime via the redistributable installer). And there's no need for any installer - you can just copy the files onto a PC and it all works.

    0 讨论(0)
  • 2021-02-06 12:13

    I believe installing Microsoft C++ Redistributable Package will install the DLL you need correctly.

    0 讨论(0)
提交回复
热议问题