[Distutils] distutils and MSVCR90.DLL

Mark Sienkiewicz sienkiew at stsci.edu
Tue Jan 4 23:54:11 CET 2011


Hi,

I have a python package with C extensions.  In Python 2.5 on Windows, it works as expected.  In Python 2.7, it compiles and installs, but the import fails with:

ImportError: DLL load failed: The specified procedure could not be found.

I found a program called "Dependecy Walker" that tells me this about the .pyd file:

Error: At least one required implicit or forwarded dependency was not found.
Warning: At least one delay-load dependency module was not found.
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.

It also says the missing library is MSVCR90.DLL which contains things like malloc and printf.  (It is also missing IESHIMS.DLL and WER.DLL but those are required by IEFRAME.DLL, so they may be a secondary problem.)

Apparently, MSVCR90 is a newer version of the C runtime library.  I have several copies of MSVCR71.DLL on my machine, but nothing named MSVCR90.DLL.

This leads to an obvious question:  How did I manage to compile C source code that depends on a shared library that is not even present on my machine?  I suspect it is because whoever built the Python distribution did it with a compiler that did have MSVCR90, and python remembered and told distutils.

Some web searching led me to find "vcredist_x86.exe" on Microsoft's web site, but installing that did not fix anything and did not create a file on my system name MSVCR90.DLL.  From http://support.microsoft.com/kb/326922 , I get the impression that MSVCR90.DLL should have been distributed with Python.  Or maybe not...

I'm about at the limit of my Windows expertise here.  Can anybody help?

Mark S.




More information about the Distutils-SIG mailing list