LDAP install in Py3 development on Debian Jessie fails (solution included)
See original GitHub issueExpected Behaviour
Instructions to install LDAP should install LDAP.
Actual Behaviour
sudo python install.py --develop  installing automatically switches to Python3 env.
Setting up LDAP in erpnext directs to following instructions.
By running ./env/bin/pip install python-ldap --global-option=build_ext --global-option="-I$(xcrun --show-sdk-path)/usr/include/sasl" causes an error (also reported here):
~/frappe-bench$ ./env/bin/pip install python-ldap \
>     --global-option=build_ext \
>     --global-option="-I$(xcrun --show-sdk-path)/usr/include/sasl"
-bash: xcrun: command not found
/home/osboxes/frappe-bench/env/lib/python3.4/site-packages/pip/commands/install.                                                                                                                                                             py:194: UserWarning: Disabling all use of wheels due to the use of --build-optio                                                                                                                                                             ns / --global-options / --install-options.
  cmdoptions.check_install_build_global(options)
Collecting python-ldap
  Using cached python-ldap-2.5.2.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-_athj5ru/python-ldap/setup.py", line 9, in <module>
        from ConfigParser import ConfigParser
    ImportError: No module named 'ConfigParser'
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-_a                                                                                                                                                             thj5ru/python-ldap/
Steps to reproduce:
sudo python install.py --developin python3 env- run  
./env/bin/pip install python-ldap --global-option=build_ext --global-option="-I$(xcrun --show-sdk-path)/usr/include/sasl" 
Suggested temporary solution
Do pip install from repo. In master repo ConfigParser (in py2) vs configparser (in py3) handling is already introduced.
Replace  installation instruction with following:
~/frappe-bench$ ./env/bin/pip install git+https://github.com/python-ldap/python-ldap.git                                                                                                                                         --global-option=build_ext     --global-option="-I$(xcrun --show-sdk-path)/usr/include/sasl"
ENV:
- ERPNext: v11.x.x-develop (b48557f) (develop)
 - Frappe Framework: v11.x.x-develop (a01275d) (develop)
 - OS: Debian GNU/Linux 8.10 (jessie)
 
Issue Analytics
- State:
 - Created 6 years ago
 - Comments:5 (5 by maintainers)
 

Top Related StackOverflow Question
I’d like to visit your bounty. 😄
Haha, way to go 3!