[python-ldap] problems using import ldap

Michael Wood esiotrot at gmail.com
Tue Jul 19 14:35:16 CEST 2011


On 19 July 2011 14:07, Francis Abrante <fabrante at yahoo.com> wrote:
>
> Hi again
>
> I tried to uninstall and install the package and doesn't work either.
>
> root at orbac-desktop:~/python-ldap/python-ldap-2.4.0# apt-get install python-ldap
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> python-ldap is already the newest version.
> 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

That's because it is already correctly installed.  The problem is not
with the python-ldap package, but rather with your non-standard
installation of Python (/usr/local/bin/python), which as I said I
suspect has something to do with "pycharm", with which I am
unfamiliar.

[...]
> 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

You did not correctly follow my instructions.

I said you should try:

$ /usr/bin/python -c "import ldap;print ldap.__version__"

and not just:

$ python -c "import ldap;print ldap.__version__"

And I still think pycharm is what's causing this to not just work out
of the box.  So you might want to contact them rather.

-- 
Michael Wood <esiotrot at gmail.com>


More information about the python-ldap mailing list