I am trying to use the python-ldap library with Python 2.7 on Windows 7 64 bit. I have 64bit Python and I was able to get most libraries up and running with the help of the excellent repository run by Mr. Gohlke: http://www.lfd.uci.edu/~gohlke/pythonlibs/
However, on python-ldap I stumped: when I install it and then try to include it:
import ldap
I get the following error:
File "[...]\__init__.py", line 22, in <module>
from ldap._ldap import *
ImportError: DLL load failed: %1 is not a valid Win32 application.
The %1
file is _ldap.pyd
Am I doing anything wrong?
This question is now moot. I have had the problem as described when I installed python-ldap-2.4.13.win-amd64-py2.7
. I then uninstalled and tried installing win32 version from PyPI, that of course did not work either. Then I uninstalled that version, and re-installed (from the same exe file) the 64bit version. Now everything works.
EDIT SUMMARY:
you can install the version of Osuch here: https://pypi.python.org/pypi/python-ldap/
select the version appropriate
source: http://www.osuch.org/python-ldap
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.