How do I install python_ldap on 64 bit windows 7?
Asked Answered
A

4

9

I'm using python 2.7.6 and in my code I have a line:

    import psycopg2.extensions

which I've installed using pip. Next, my editor tells me, that psycopg2 requires python_ldap=2.4.19. However, in the PyPI repository, there's only a 32 bit version, which doesn't work, since my Windows is 64 bit. There's a 64 bit version of python_ldap=2.4.28, avaliable here, however running

    pip install python_ldap-2.4.28-cp27-cp27m-win_amd64.whl

in the windows command line returns

    python_ldap-2.4.28-cp27-cp27m-win_amd64.whl is not a supported wheel on this platform.

in red, which I guess is an error meassage. So, in the end, what should I do to have the package installed on my laptop?

Allisonallissa answered 29/11, 2016 at 17:2 Comment(0)
S
20

For anyone who's facing this, I solved this problem by installing the wheel from http://www.lfd.uci.edu/~gohlke/pythonlibs/#python-ldap.

Cheers.

EDIT: I did this on a 64 bit Windows 10 machine, but I presume the same solution applies to Windows 7.

Sabellian answered 21/5, 2017 at 16:10 Comment(1)
I guess the is the only option to install python-ldap in Win 7. Make sure you choose the binary version matching your version of Python install.Meeting
M
6

$ python --version Python 3.6.0

pip install --only-binary :all: python_ldap-3.1.0-cp36-cp36m-win_amd64.whl

Make sure you choose the .whl file version matching the python install version

pip install --only-binary :all: python_ldap-3.1.0-cp36-cp36m-win_amd64.whl

Processing c:\users\sthomas05\downloads\python_ldap-3.1.0-cp36-cp36m-win_amd64.whl
Requirement already satisfied: pyasn1>=0.3.7 in c:\users\sthomas05\appdata\roaming\python\python36\site-packages (from python-ldap==3.1.0) (0.4.5)
Requirement already satisfied: pyasn1-modules>=0.1.5 in c:\users\sthomas05\appdata\roaming\python\python36\site-packages (from python-ldap==3.1.0) (0.2.4)
Installing collected packages: python-ldap
Successfully installed python-ldap-3.1.0
Meeting answered 7/2, 2019 at 5:46 Comment(1)
I could not get the 3.1 version mentioned above, but i was able to use different version and got it working. lfd.uci.edu/~gohlke/pythonlibs/#pyldap download pyldap-2.4.45-cp37-cp37m-win_amd64.whl pip install --only-binary :all: pyldap-2.4.45-cp37-cp37m-win_amd64.whlCarpophagous
Z
0

As mentioned on the official website the unofficial package from on Christoph Gohlke’s page should work. Latest update is from 3rd of July, so it seems to be pretty up to date.

Zing answered 17/8, 2020 at 13:11 Comment(2)
those libraries are useless, as the last python version there is 3.4Ascertain
the last python version there is 3.11. The 3.4 refers to the open-ldap versionEclampsia
C
0

If you're looking for pre-built Python-ldap wheel files for Windows, you can find them on Christoph Gohlke’s GitHub Page. This can be a convenient alternative to other methods mentioned in the answers.

Python-ldap release: python-ldap-builds

pip install <name-of-the-wheel-file>.whl

Tested and works on python3.11

Carmelitacarmelite answered 21/5 at 12:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.