[Mailman-Users] ImportError: No module named ldap

Mark Sapiro msapiro at value.net
Thu Jul 26 01:28:22 CEST 2007

Mike Rosile wrote:

>I'm trying to write to implement LDAPMemberships v3 using Mailman
>v2.1.9, but I keep getting an error in the Mailman error log that says
>"ImportError: No module named ldap".
>For the record, I can import 'ldap' (aka python-ldap) from a regular
>python script (from the command line).

I'm guessing that the command line python invocation finds the ldap
module because its path is in the PYTHONPATH environment variable.
This doesn't work with the Mailman CGI wrapper because the wrapper
resets PYTHONPATH to contain only the path to the Mailman modules.

If this is the issue, I suggest you install the ldap module in your
python library site-packages/ directory.

Another possibility is that mailman was configured with a different
python from the current command line python, in which the ldap module
is installed.

Mark Sapiro <msapiro at value.net>       The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

More information about the Mailman-Users mailing list