[python-ldap] problems using import ldap
Michael Ströder
michael at stroeder.com
Tue Jul 19 14:16:34 CEST 2011
Francis Abrante wrote:
> root at orbac-desktop:~/python-ldap/python-ldap-2.4.0# python -c "import
> ldap;print ldap.__version__"
> Traceback (most recent call last):
> File "<string>", line 1, in <module>
> ImportError: No module named ldap
Please read the Python docs at the link I've already posted:
http://www.python-ldap.org/doc/html/installing.html
Especially find out which Python interpreter you're environment is really
using. Then type
§ /path/to/python -c "import sys;print sys.prefix;print sys.exec_prefix"
/usr
/usr
where /path/to is the full path to the Python interpreter executable you're
trying to use. See the docs above how that helps to find out where modules get
installed.
Similar when building/installing from source
/path/to/python setup.py install
has to be invoked to install python-ldap (like all other DistUtils-based
Python modules).
Ciao, Michael.
More information about the python-ldap
mailing list