Are you running web2py from source or using the Windows binary? If the 
latter, the web2py binary includes its own Python interpreter and does not 
see or use anything from your machine's Python installation. If you have 
Python installed, run web2py from source instead (it's just as easy to 
download and run).

Anthony

On Tuesday, June 26, 2012 1:36:14 AM UTC-4, aungsan wrote:
>
> from gluon.contrib.login_methods.ldap_auth import ldap_auth
> auth.settings.login_methods = [ldap_auth(mode='ad',
>    server='abc.google.com', base_dn='ou=Users, dc=google,dc=com')]
>
> I am having the following error.
>
> File "gluon/contrib/login_methods/ldap_auth.py", line 9, in <module>
> ImportError: No module named ldap
>
>
> I installed easy_install python-ldap.
>
> I test with just a line in test.py and run python test.py
>
> import ldap
>
> See no error.
>
> i re-install by msi packages. 
>
>
> http://pypi.python.org/packages/2.7/p/python-ldap/python-ldap-2.4.10.win32-py2.7.msi#md5=7bcf356c590ea093f7c3ad410c155f82
>
> Test with simple import. It work. But web2py still giving error.
>
>

-- 



Reply via email to