Skip to content Skip to sidebar Skip to footer

Py2exe: Compiled Python Windows Application Won't Run Because Of DLL

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 it wo

Solution 1:

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.


Solution 2:

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


Post a Comment for "Py2exe: Compiled Python Windows Application Won't Run Because Of DLL"