Can't Import LDAP

LI Xin delphij at
Sat Sep 30 09:54:39 CEST 2006

Ted Johnson wrote:
> 2
> */LI Xin <delphij at>/* wrote:
>     Hi, Ted,
>     Ted Johnson wrote:
>     > Hi;
>     > I'm on FreeBSD 6.1. I've successfully installed OpenLDAP from the port
>     > (I can issue commands to the s/w at the prompt) and it appears
>     I've done
>     > the same with py-ldap2 (don't know what commands to issue, but FreeBSD
>     > says the s/w was loaded successfully). However, when I fire up my
>     Python
>     > interpreter and enter "import ldap" I'm told no such module exists.
>     > What could I be doing wrong?
>     I do use py-ldap2 on FreeBSD a lot, and I think I have did a good job on
>     the port ;-) so I would like to help out.
>     Which python release do you use?
>     2.3.5
>     Will you please check the output of
>     'pkg_info -L py24-ldap2-2.2.0' to confirm that it has installed the
>     stuff into your python installation's site-packages/ directory?
>     Here it is, thanks for your help, and TIA for any further direction
>     you can provide.
>     Ted
> server167# pkg_info -L py24-ldap2-2.2.0
> Information for py24-ldap2-2.2.0:
> Files:
> /usr/local/lib/python2.4/site-packages/
> /usr/local/lib/python2.4/site-packages/dsml.pyc

It seems that you have side-by-side installation of Python 2.4 and 2.3.
 Will you please deinstall one and re-install python-ldap, to see if it
is built with python-2.3?

BTW.  If you do not have specific reason to use Python 2.3.x (be sure to
rebuild all py23-*), I would suggest that you install 2.4 series.

Xin LI <delphij at>
FreeBSD - The Power to Serve!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the python-ldap mailing list