MB_YD
MB_YD

Reputation: 41

Python: ldap AttributeError

When I write in cmd:

ldap.initialize()

I got the communicate :

AttributeError: module 'ldap' has no attribute 'initialize'

I searched throught posts and I have read that it should be a problem with ldap package. I followed the tips and I uninstalled ldap with pip (varsion 18.0) command and then I installed it again, but nothing changed. I have ldap version 2.5.1 and ldap3 0.4.4

Upvotes: 1

Views: 3972

Answers (1)

smagnan
smagnan

Reputation: 1257

Try to uninstall ldap again and use pip to install python-ldap instead, which is the correct package I believe.

See the doc there: http://www.python-ldap.org/en/latest/

You might also need to install it with apt-get: sudo apt-get install python-ldap

Also as @glibdud mentioned, make sure you have no ldap.py file in your working directory

Upvotes: 2

Related Questions