question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

LDAP install in Py3 development on Debian Jessie fails (solution included)

See original GitHub issue

Expected 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:

  1. sudo python install.py --develop in python3 env
  2. 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:closed
  • Created 6 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
achillesrasquinhacommented, Mar 12, 2018

I’d like to visit your bounty. 😄

0reactions
achillesrasquinhacommented, Mar 20, 2018

Haha, way to go 3!

Read more comments on GitHub >

github_iconTop Results From Across the Web

I can't install python-ldap - Stack Overflow
To install python-ldap successfully with pip, following development libraries are needed (package names taken from ubuntu environment):
Read more >
Installing python-ldap — python-ldap 3.3.0 documentation
For installing from PyPI, you will need the same Build prerequisites as when installing from source. We do not currently provide pre-built packages...
Read more >
python-ldap Documentation - Read the Docs
The LDAP protocol states that some fields (distinguished names, relative distinguished names, attribute names, queries) be encoded in UTF-8. In ...
Read more >
Chapter 5. Issues to be aware of for bullseye - Debian
If your APT configuration also involves pinning or APT::Default-Release , it is likely to require adjustments as the codename of the security archive...
Read more >
Install Elasticsearch with Debian Package
Duplicate sources.list entry https://artifacts.elastic.co/packages/8.x/apt/ ...` Examine /etc/apt ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found