简体   繁体   English

如何在 64 位 Windows 7 上安装 python_ldap?

[英]How do I install python_ldap on 64 bit windows 7?

I'm using python 2.7.6 and in my code I have a line:我正在使用 python 2.7.6,在我的代码中有一行:

    import psycopg2.extensions

which I've installed using pip.我已经使用 pip 安装了它。 Next, my editor tells me, that psycopg2 requires python_ldap=2.4.19.接下来,我的编辑告诉我,psycopg2 需要 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.但是,在 PyPI 存储库中,只有 32 位版本,这不起作用,因为我的 Windows 是 64 位。 There's a 64 bit version of python_ldap=2.4.28, avaliable here , however running有一个 64 位版本的 python_ldap=2.4.28,可用在这里,但是正在运行

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

in the windows command line returns在 windows 命令行中返回

    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?那么,最后,我应该怎么做才能在我的笔记本电脑上安装这个软件包?

For anyone who's facing this, I solved this problem by installing the wheel from http://www.lfd.uci.edu/~gohlke/pythonlibs/#python-ldap .对于任何面临这个问题的人,我通过从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.编辑:我在 64 位 Windows 10 机器上执行此操作,但我认为相同的解决方案适用于 Windows 7。

$ python --version Python 3.6.0 $ python --version Python 3.6.0

pip install --only-binary :all: python_ldap-3.1.0- cp36-cp36m -win_amd64.whl 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确保选择与 python 安装版本匹配的 .whl 文件版本

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

As mentioned on the official website the unofficial package from on Christoph Gohlke's page should work.正如官方网站上提到的,来自 Christoph Gohlke 页面的非官方软件包应该可以工作。 Latest update is from 3rd of July, so it seems to be pretty up to date.最新更新是从 7 月 3 日开始的,所以它似乎是最新的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Windows 64位上安装Python 2.7模块? - How do I install Python 2.7 modules on Windows 64-Bit? 如何为Windows 64位Python 2.7编译guppy? - How do I compile guppy for Windows 64 bit Python 2.7? 如何为64位Windows和Python 2.7安装ZBar? - How to install ZBar for 64-bit Windows and Python 2.7? 如何在Windows 7 64位计算机上为蟒蛇的python 3.5安装cvxopt? - how to install cvxopt on windows 7 64 bit machine for python 3.5 of anaconda? 如何安装PyGSL? (Windows 7、64位,Python 2.7,GSL 1.15) - How to install PyGSL? (Windows 7, 64 bit, Python 2.7, GSL 1.15) 我在哪里可以下载/如何在 Windows 10 64 位笔记本电脑上安装适用于 Windows 的 python 2.7 32 位? Pepper 机器人需要 - Where can I download / how can I install python 2.7 32-bit for Windows on a Windows 10 64-bit laptop? Required for Pepper Robot 如何为 64 位 Windows 安装 pywinauto - How to install pywinauto for 64-bit Windows 我如何弄清楚为什么Python在Windows 7 64位中抛出这种非描述性错误 - How do I figure out why Python is throwing this non-descriptive error in Windows 7 64 bit 64位Windows 7上的Python 32或64? 如何安装easy_install? - Python 32 or 64 on 64 bit Windows 7? How will this effect installing easy_install? 如何在Windows 7(64位)上安装TCPReplay - How to install TCPReplay on windows 7, 64-bit
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM