msvcr90.dll is MIA?

Enrico nospam at nospam.it
Wed Apr 14 15:59:34 CEST 2010


Il 14/04/2010 14:25, Alex Hall ha scritto:
> I notice that I do not have the dll when py2exe says it cannot locate
> the dll. If I need vs2008, then what good is vcredist_xxx.exe? It does
> not seem to give me the dll, but the py2exe tutorial says that it
> will. What am I missing?

Alex, the DLLs are in winsxs, try searching there.
For py2exe, it doesn't find the DLLs so you should provide them. In my 
setup.py (I use also the wxPython lib so something could be different) I 
added:

def isSystemDLL(pathname):
     if os.path.basename(pathname).lower() in ('msvcp90.dll'):
         return 0
     return origIsSystemDLL(pathname)
origIsSystemDLL = py2exe.build_exe.isSystemDLL
py2exe.build_exe.isSystemDLL = isSystemDLL

Then I added to 'dll_excludes' the same 'msvcp90.dll'.

In this way py2exe is ok without this DLL and can build the excutable. 
Note that the dll that py2exe is looking for is msvcp90 in my case.

Then I added a subdirectory with the DLLs (msvcr90, msvcp90, msvcm90) to 
the distribution directory. You need a manifest too :-)

Ok, it seems complex but you can check the followings
http://www.py2exe.org/index.cgi/Tutorial
http://wiki.wxpython.org/py2exe (related to wxPython but look at the 
manifest)

An other solution is to run the vcredist on the target machine and the 
application will run. This is the suggested solution if you cannot 
distibute the DLLs.

Bye, Enrico



More information about the Python-list mailing list