Friday, November 25, 2016

Installing python-ldap in Windows64

I tried to download and install python-ldap using 'pip install python-ldap' in my windows 64 bit machine. It issued a build error pointing 'lber.h was missing or can't be found'.

After a long search, the below step solved my problem. I'm using python 2.7 packaage.

Steps:
  1. Make sure you have latest pip 8 and microsoft 9.0 version. If not, upgrade them.
  2. Here you are installing the compiled version of python-ldap. Open link http://svn.kmrc.de/download/distribution/contrib/ and download python_ldap-2.4.10-py2.7-win32.egg.
  3. Go to the folder where its downloaded and in cmd type 'python -m easy_install python_ldap-2.4.10-py2.7-win32.egg.

To check whether all is working right, type in cmd
$python
>>import python
You should see no errors.