[python-ldap] import _ldap: ImportError: Cannot load specified object

Michael Ströder michael at stroeder.com
Tue Aug 27 21:05:25 CEST 2013

Zhang Huangbin wrote:
> I tried to run my python web application on OpenBSD 5.3 with python-ldap-2.4.13, but it raises below error message:
> import _ldap
> ImportError: Cannot load specified object
> I installed python-ldap-2.4.13 manually, and it works within Python interpreter:
> [..]
> $ python
>>>> import ldap
>>>> import _ldap
>>>> from _ldap import *
> I can see file _ldap.* below:
> # ls /usr/local/lib/python2.7/site-packages/python_ldap-2.4.13-py2.7-openbsd-5.3-amd64.egg/_ldap*
> /usr/local/lib/python2.7/site-packages/python_ldap-2.4.13-py2.7-openbsd-5.3-amd64.egg/_ldap.py
> /usr/local/lib/python2.7/site-packages/python_ldap-2.4.13-py2.7-openbsd-5.3-amd64.egg/_ldap.pyc
> /usr/local/lib/python2.7/site-packages/python_ldap-2.4.13-py2.7-openbsd-5.3-amd64.egg/_ldap.pyo
> /usr/local/lib/python2.7/site-packages/python_ldap-2.4.13-py2.7-openbsd-5.3-amd64.egg/_ldap.so

Is there any permissions problem?
python -c "import ldap"
also work when invoked as the web application's user?

Ciao, Michael.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2398 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20130827/fba051ae/attachment.bin>

More information about the python-ldap mailing list