Doing the usual to install python-ldap on ubuntu server
$ pip install python-ldap
Gave me this unpleasant
$ error: command 'gcc' failed with exit status 1After some searching around it turns out that it needs the development files for python and openldap. Installing it still gave me missing module error, which was a missing cyrus sasl package.
Install all three of these packages before you install python-ldap
$ sudo apt-get install python-dev $ sudo apt-get install libldap2-dev $ sudo apt-get install libsasl2-devOnce all that out of the way run
$ pip install python-ldapNow you should have a working python-ldap install.