【问题标题】:Python-LDAP authentication on Windows 7Windows 7 上的 Python-LDAP 身份验证
【发布时间】:2018-09-19 10:14:19
【问题描述】:

我想将 Flask-LDAP 安装到我的计算机 (Windows 7),它有一个名为 python-ldap 的先决条件。

我尝试按照这个安装:

https://pypi.org/project/python-ldap/3.1.0/

pip 安装错误消息:

C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\corecrt.h(10) : fatal error C1083: Cannot open include file: 'vcruntime.h': No such file or directory
error: command 'C:\\Users\\...\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\bin\\x86_amd64\\cl.exe' failed with exit status 2

已安装 Windows SDK 7,10。

我也不确定之后会发生什么,因为 OpenLDAP 设置可执行文件要求串行。我无法t find a version which can be installed on Windows. Visual C++ is also installed, I didnt 找到与丢失 vcruntime.h 相关的任何内容。我的整台机器上没有这样的文件。

有人可以帮助我指导如何进行吗?

提前谢谢你。

【问题讨论】:

    标签: python c++ windows ldap


    【解决方案1】:

    你没有C++ Compiler for Python,尝试在windows中安装:

    这里是Microsoft Visual C++ Compiler for Python 2.7,如果你的python版本是2.7,在windows下安装vc编译器后可以安装python-ldap成功

    【讨论】:

    • 我有 Python 3.7。我尝试按照以下方式通过 MingW32 进行操作:github.com/valtron/llvm-stuff/wiki/… 现在我在 init 中的“运行 build_ext”文件“c:\python37\lib\distutils\cygwinccompiler.py”第 129 行中出现此错误b> if self.ld_version >= "2.10.90": TypeError: '>=' not supported between 'NoneType' and 'str'
    • 我还尝试使用安装了 Visual C++ for Python 2.7 的 Python 2.7:c:\users\myuser\appdata\local\temp\2\pip-build-dbr9yw\python-ldap\modules\ constants.h(7):致命错误 C1083:无法打开包含文件:'lber.h':没有这样的文件或目录错误:命令'C:\\Users\\myuser\\AppData\\Local\\Programs \\Common\\Microsof t\\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' 失败,退出状态为 2
    • @hkoko 尝试用轮子安装它lfd.uci.edu/~gohlke/pythonlibs/#pyldap
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多