[Distutils] Binary installer on Windows can't install extension

Steve Dower Steve.Dower at microsoft.com
Fri Jun 14 00:05:06 CEST 2013


You will need a 64-bit version of mxDateTime.pyd when used with 64-bit Python. The DLL load fails because a 64-bit process can only load 64-bit DLLs.

If you can't get a 64-bit version, it should not be a problem to install and use a 32-bit version of Python on 64-bit Windows (and I generally recommend it - the only thing you gain with 64-bit Python is a higher memory limit).


Cheers,
Steve

-----Original Message-----
From: Distutils-SIG [mailto:distutils-sig-bounces+steve.dower=microsoft.com at python.org] On Behalf Of Malte Forkel
Sent: Wednesday, June 12, 2013 1010
To: Distutils-Sig at Python.Org
Subject: [Distutils] Binary installer on Windows can't install extension

Hello,

I have a problem with an install script in Python 2.7.5 on Windows 7 64-Bit.

I have written an install script to register a COM server for a
Windows-specific package. I specify the script with the --install-script
option to the bdist_wininst command.

When I run the installer, the install script fails trying to install an
extension:

Traceback (most recent call last):
  ...
  File "C:\Program
Files\Python\lib\site-packages\mx\DateTime\DateTime.py", line 9, in <module>
    from mxDateTime import *
  File "C:\Program
Files\Python\lib\site-packages\mx\DateTime\mxDateTime\__init__.py", line
13, in <module>
    raise ImportError, why
ImportError: DLL load failed: %1 is not a valid Win32 application.
close failed in file object destructor:
sys.excepthook is missing
lost sys.stderr

The last three lines of output are probably caused by a known, unrelated
issue (http://bugs.python.org/issue15321).

I can run the install script by hand without problems. Importing
mx.DateTime in Python works fine as well.

I know very litte about Windows internals, but have a guess
nevertheless: I checked mx\DateTime\mxDateTime\mxDateTime.pyd with
Dependency Walker (depends.exe). It seems, the extension does not find
the proper version of MSVCR90.DLL. Instead, it is trying to use a 32-bit
version of the DLL that was installed as part of a 32-bit application.
The application's directory is included in the user search path (PATH).
Obviously, a 64-bit version of the DLL exists and is used by Python itself.

What is causing my problem? How can I solve it?

Thanks,
Malte




_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG at python.org
http://mail.python.org/mailman/listinfo/distutils-sig





More information about the Distutils-SIG mailing list