[python-ldap] problems using import ldap

Francis Abrante fabrante at yahoo.com
Tue Jul 19 14:07:09 CEST 2011


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.


root at orbac-desktop:~/python-ldap/python-ldap-2.4.0# apt-get remove python-ldap
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  python-ldap
0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded.
After this operation, 352kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 150730 files and directories currently installed.)
Removing python-ldap ...


root at orbac-desktop:~/python-ldap/python-ldap-2.4.0# apt-get install python-ldapReading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  python-ldap-doc
The following NEW packages will be installed:
  python-ldap
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 0B/75.2kB of archives.
After this operation, 352kB of additional disk space will be used.
Selecting previously deselected package python-ldap.
(Reading database ... 150683 files and directories currently installed.)
Unpacking python-ldap (from .../python-ldap_2.3.10-1ubuntu1_i386.deb) ...
Setting up python-ldap (2.3.10-1ubuntu1) ...
Processing triggers for python-central ...


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


--- El mar, 7/19/11, Michael Wood <esiotrot at gmail.com> escribió:

De: Michael Wood <esiotrot at gmail.com>
Asunto: Re: [python-ldap] problems using import ldap
A: "Michael Ströder" <michael at stroeder.com>
Cc: "Francis Abrante" <fabrante at yahoo.com>, python-ldap at python.org
Fecha: martes, 19 de julio de 2011, 05:53 am

Hi

2011/7/19 Michael Ströder <michael at stroeder.com>:
> Francis,
>
> please always follow-up on the mailing list (cc:-ed).
>
> Unfortunately you also do not provide any information needed to help you.
>
> Francis Abrante wrote:
>> this is the output
>>
>> Thanks
>>
>> orbac at orbac-desktop:~$ python -c "import ldap;print ldap.__version__"
>> Traceback (most recent call last):
>>   File "<string>", line 1, in <module>
>> ImportError: No module named ldap
>
> So how did you install python-ldap? If you're using a pre-packaged version of
> python-ldap found in Ubuntu the command above should simply work - provided
> you're using the right Python interpreter.

In his initial post he said:

"I did the python-ldap installation with apt-get"

so I agree that should "just work".

> If you decide to build and install python-ldap yourself then you should follow
> the instructions here:
>
> http://www.python-ldap.org/doc/html/installing.html

I think it would be better to get the version installed via apt-get to
work than to install it manually.

Francis, what do the following commands give you?

$ dpkg -l python-ldap
$ dpkg -l 'python[23]*' | grep ^i
$ which python
$ ls -l $(which python)
$ ls -l /usr/bin/python
$ lsb_release -a

-- 
Michael Wood <esiotrot at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20110719/8530025a/attachment-0001.html>


More information about the python-ldap mailing list