[python-win32] Building msi with python 2.6.2

Mark Hammond skippy.hammond at gmail.com
Tue Jun 16 10:41:42 CEST 2009


On 16/06/2009 12:40 PM, Roberto Aguilar wrote:
> Hello everyone,
>
> I've been able to successfully build a MSI of pywin32 under Python
> 2.6.2. But, when trying to use python, e.g. "import win32api", after
> installing the MSI I get:
>
> ImportError: DLL load failed: The specified module could not be found.
>
> With the help of a colleague, I discovered the problem is due to python
> not finding pywintypes26.dll. This file was installed by the MSI. It's in:
>
> C:\Python26\Lib\site-packages\pywin32_system32
>
> but that location is not being searched when importing.
>
> I can either:
>
> - set PATH=c:\Python26\Lib\site-packages\pywin32_system32;%PATH%
> - then importing win32api works fine.
>
> or
>
> - move pywintypes26.dll to c:\Python26\Lib\site-packages\win32
> - then importing win32api works fine.

Or arrange to execute 'pywin32-postinstall.py -install' at the end of 
the install, which will copy those files somewhere suitable (either 
system32, or to the python dir).

I'd be happy to make that script friendlier for MSI if necessary (and 
hopefully you will contribute the MSI process back to pywin32 ;)

Cheers,

Mark


More information about the python-win32 mailing list