[SOLVED] Frappe v11 + python3 + Ldap


ERPNext: v11.0.3-beta.34 () (staging)
Frappe Framework: v11.0.3-beta.48 () (staging)
OS: Debian GNU/Linux 8.11 (jessie)


Migrated erpnext and frappe from production to staging. Also swithced to python3.6.
Installed python3-ldap in /home/frappe/frappe-bench/env/bin/python3 but facing expected error message when logging in using ldap:

Apparently import ldap as is used here does not work anymore as module is named ldap3 now. And syntax in ldap3 is apparently significantly different from ldap.


python3-ldap is a different module from python-ldap and was renamed to ldap3 to avoid confusion.
But there are still complications installing python-ldap in python3 environemnt. As pip is trying to compile missing parts and fails.


Run sudo apt-get install libpython3.6-dev for pip to be able to compile missing module components.
Then env/bin/pip3 install python-ldap from frappe-bench directory.

Also debian jessie would need a reference to backport repo in apt sources list and ppa repo to install python 3.6.

taking a little sidestep here … on my debian 9 the python3 version available is 3.5 (same on ubuntu 16.04). Is there any need for 3.6 in order to run frappe/erpnext smoothly?

No, i don’t think you need 3.6 for that. 3.5 IMHO should be fine.

1 Like

Just note that the travis tests run on 2.7 and 3.6, and not 3.5 ERPNext V11, Python 3 or 2.7 - #6 by clarkej