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.
Update
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.
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?