python-ldap安装失败

安装 python-ldap 包时出现错误,如下:

"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DHAVE_SASL -DHAVE_TLS -DLDAPMODULE_VERSION=3.4.4 "-DLDAPMODULE_AUTHOR=python-ldap project" "-DLDAPMODULE_LICENSE=Python style" -IModules -IC:\Users\jiahe\scoop\apps\python38\current\include -IC:\Users\jiahe\scoop\apps\python38\current\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /TcModules/LDAPObject.c /Fobuild\temp.win-amd64-cpython-38\Release\Modules/LDAPObject.obj
LDAPObject.c
C:\Users\jiahe\AppData\Local\Temp\pip-install-xhre2otp\python-ldap_7783ac0f126e44ddb07bd17f8f8f826f\Modules\common.h(15): fatal error C1083: 无法打开包括文件: “lber.h”: No such file or directory
error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.42.34433\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for python-ldap
Failed to build python-ldap
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (python-ldap)

https://github.com/cgohlke/python-ldap-build/releases下载对应版本的whl文件,然后通过pip install安装即可解决。

另外,在解决过程中发现,很多历史帖子,都提到了这个网站https://www.lfd.uci.edu/~gohlke/pythonlibs/#python-ldap ,但是它已经不对外了,难过😔。