【急急急】django-auth-ldap 一直装不上

来源:2-6 虚拟环境的安装和配置

爱吃的鱼小猫

2020-09-07

安装命令:pip install django-auth-ldap==2.1.0 -i https://pypi.douban.com/simple/
请老师指导一下。错误信息
Installing collected packages: python-ldap, django-auth-ldap
Running setup.py install for python-ldap … error
ERROR: Command errored out with exit status 1:
command: ‘f:\pycharm\a-master\venv\scripts\python.exe’ -u -c ‘i
mport sys, setuptools, tokenize; sys.argv[0] = ‘"’"‘C:\Users\dell\AppDa
ta\Local\Temp\pip-install-vg4e68p1\python-ldap\setup.py’"’"’; file
=’"’"‘C:\Users\dell\AppData\Local\Temp\pip-install-vg4e68p1\python
-ldap\setup.py’"’"’;f=getattr(tokenize, ‘"’"‘open’"’"’, open)(file);c
ode=f.read().replace(’"’"’\r\n’"’"’, ‘"’"’\n’"’"’);f.close();exec(compile(
code, file, ‘"’"‘exec’"’"’))’ install --record ‘C:\Users\dell\AppData
Local\Temp\pip-record-vbrkvxoj\install-record.txt’ --single-version-extern
ally-managed --compile --install-headers 'f:\pycharm\a-master\venv\i
nclude\site\python3.7\python-ldap’
cwd: C:\Users\dell\AppData\Local\Temp\pip-install-vg4e68p1\python
-ldap
Complete output (79 lines):
running install
running build
running build_py
creating build\lib.win-amd64-3.7
copying Lib\ldapurl.py -> build\lib.win-amd64-3.7
copying Lib\ldif.py -> build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\ldap
copying Lib\ldap\async.py -> build\lib.win-amd64-3.7\ldap
copying Lib\ldap\asyncsearch.py -> build\lib.win-amd64-3.7\ldap
copying Lib\ldap\cidict.py -> build\lib.win-amd64-3.7\ldap
copying Lib\ldap\compat.py -> build\lib.win-amd64-3.7\ldap
copying Lib\ldap\constants.py -> build\lib.win-amd64-3.7\ldap
copying Lib\ldap\dn.py -> build\lib.win-amd64-3.7\ldap
copying Lib\ldap\filter.py -> build\lib.win-amd64-3.7\ldap
copying Lib\ldap\functions.py -> build\lib.win-amd64-3.7\ldap
copying Lib\ldap\ldapobject.py -> build\lib.win-amd64-3.7\ldap
copying Lib\ldap\logger.py -> build\lib.win-amd64-3.7\ldap
copying Lib\ldap\modlist.py -> build\lib.win-amd64-3.7\ldap
copying Lib\ldap\pkginfo.py -> build\lib.win-amd64-3.7\ldap
copying Lib\ldap\resiter.py -> build\lib.win-amd64-3.7\ldap
copying Lib\ldap\sasl.py -> build\lib.win-amd64-3.7\ldap
copying Lib\ldap\syncrepl.py -> build\lib.win-amd64-3.7\ldap
copying Lib\ldap_init
.py -> build\lib.win-amd64-3.7\ldap
creating build\lib.win-amd64-3.7\ldap\controls
copying Lib\ldap\controls\deref.py -> build\lib.win-amd64-3.7\ldap\con
trols
copying Lib\ldap\controls\libldap.py -> build\lib.win-amd64-3.7\ldap\c
ontrols
copying Lib\ldap\controls\openldap.py -> build\lib.win-amd64-3.7\ldap
controls
copying Lib\ldap\controls\pagedresults.py -> build\lib.win-amd64-3.7\l
dap\controls
copying Lib\ldap\controls\ppolicy.py -> build\lib.win-amd64-3.7\ldap\c
ontrols
copying Lib\ldap\controls\psearch.py -> build\lib.win-amd64-3.7\ldap\c
ontrols
copying Lib\ldap\controls\pwdpolicy.py -> build\lib.win-amd64-3.7\ldap
\controls
copying Lib\ldap\controls\readentry.py -> build\lib.win-amd64-3.7\ldap
\controls
copying Lib\ldap\controls\sessiontrack.py -> build\lib.win-amd64-3.7\l
dap\controls
copying Lib\ldap\controls\simple.py -> build\lib.win-amd64-3.7\ldap\co
ntrols
copying Lib\ldap\controls\sss.py -> build\lib.win-amd64-3.7\ldap\contr
ols
copying Lib\ldap\controls\vlv.py -> build\lib.win-amd64-3.7\ldap\contr
ols
copying Lib\ldap\controls_init
.py -> build\lib.win-amd64-3.7\ldap
controls
creating build\lib.win-amd64-3.7\ldap\extop
copying Lib\ldap\extop\dds.py -> build\lib.win-amd64-3.7\ldap\extop
copying Lib\ldap\extop\passwd.py -> build\lib.win-amd64-3.7\ldap\extop

copying Lib\ldap\extop\__init__.py -> build\lib.win-amd64-3.7\ldap\ext

op
creating build\lib.win-amd64-3.7\ldap\schema
copying Lib\ldap\schema\models.py -> build\lib.win-amd64-3.7\ldap\sche
ma
copying Lib\ldap\schema\subentry.py -> build\lib.win-amd64-3.7\ldap\sc
hema
copying Lib\ldap\schema\tokenizer.py -> build\lib.win-amd64-3.7\ldap\s
chema
copying Lib\ldap\schema_init_.py -> build\lib.win-amd64-3.7\ldap\sc
hema
creating build\lib.win-amd64-3.7\slapdtest
copying Lib\slapdtest_slapdtest.py -> build\lib.win-amd64-3.7\slapdte
st
copying Lib\slapdtest_init_.py -> build\lib.win-amd64-3.7\slapdtest

running egg_info
writing Lib\python_ldap.egg-info\PKG-INFO
writing dependency_links to Lib\python_ldap.egg-info\dependency_links.

txt
writing requirements to Lib\python_ldap.egg-info\requires.txt
writing top-level names to Lib\python_ldap.egg-info\top_level.txt
reading manifest file ‘Lib\python_ldap.egg-info\SOURCES.txt’
reading manifest template ‘MANIFEST.in
no previously-included directories found matching ‘Doc.build’
writing manifest file ‘Lib\python_ldap.egg-info\SOURCES.txt’
creating build\lib.win-amd64-3.7\slapdtest\certs
copying Lib\slapdtest\certs\README -> build\lib.win-amd64-3.7\slapdtes
t\certs
copying Lib\slapdtest\certs\ca.conf -> build\lib.win-amd64-3.7\slapdte
st\certs
copying Lib\slapdtest\certs\ca.pem -> build\lib.win-amd64-3.7\slapdtes
t\certs
copying Lib\slapdtest\certs\client.conf -> build\lib.win-amd64-3.7\sla
pdtest\certs
copying Lib\slapdtest\certs\client.key -> build\lib.win-amd64-3.7\slap
dtest\certs
copying Lib\slapdtest\certs\client.pem -> build\lib.win-amd64-3.7\slap
dtest\certs
copying Lib\slapdtest\certs\gencerts.sh -> build\lib.win-amd64-3.7\sla
pdtest\certs
copying Lib\slapdtest\certs\gennssdb.sh -> build\lib.win-amd64-3.7\sla
pdtest\certs
copying Lib\slapdtest\certs\server.conf -> build\lib.win-amd64-3.7\sla
pdtest\certs
copying Lib\slapdtest\certs\server.key -> build\lib.win-amd64-3.7\slap
dtest\certs
copying Lib\slapdtest\certs\server.pem -> build\lib.win-amd64-3.7\slap
dtest\certs
running build_ext
building ‘_ldap’ extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\Modules
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\c
l.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DHAVE_SASL -DHAVE_TLS -DHAVE_LI
BLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=3.3.1 “-DLDAPMODULE_AUTHOR=p
ython-ldap project” “-DLDAPMODULE_LICENSE=Python style” -IModules -If:\pyc
harm\a-master\venv\include -IC:\Users\dell\AppData\Local\Programs\Py
thon\Python37\include -IC:\Users\dell\AppData\Local\Programs\Python\Python
37\include “-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLU
DE” “-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt” “
-IC:\Program Files (x86)\Windows Kits\8.1\include\shared” “-IC:\Program Fi
les (x86)\Windows Kits\8.1\include\um” “-IC:\Program Files (x86)\Windows K
its\8.1\include\winrt” /TcModules/LDAPObject.c /Fobuild\temp.win-amd64-3.7
\Release\Modules/LDAPObject.obj
LDAPObject.c
c:\users\dell\appdata\local\temp\pip-install-vg4e68p1\python-ldap\modu
les\common.h(15): fatal error C1083: Cannot open include file: ‘lber.h’: N
o such file or directory
error: command ‘C:\Program Files (x86)\Microsoft Visual Studio 14.0
\VC\BIN\x86_amd64\cl.exe’ failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: ‘f:\pycharm\a-master
venv\scripts\python.exe’ -u -c ‘import sys, setuptools, tokenize; sys.argv
[0] = ‘"’"‘C:\Users\dell\AppData\Local\Temp\pip-install-vg4e68p1\py
thon-ldap\setup.py’"’"’; file=’"’"‘C:\Users\dell\AppData\Local\T
emp\pip-install-vg4e68p1\python-ldap\setup.py’"’"’;f=getattr(tokenize,
’"’"‘open’"’"’, open)(file);code=f.read().replace(’"’"’\r\n’"’"’, ‘"’"
’\n’"’"’);f.close();exec(compile(code, file, ‘"’"‘exec’"’"’))’ install
–record ‘C:\Users\dell\AppData\Local\Temp\pip-record-vbrkvxoj\install-re
cord.txt’ --single-version-externally-managed --compile --install-headers
’f:\pycharm\a-master\venv\include\site\python3.7\python-ldap’ Check
the logs for full command output.

写回答

1回答

bobby

2020-09-08

ldap我没有安装过  你可以看看这两个 https://github.com/pyldap/pyldap/issues/67  https://github.com/python-ldap/python-ldap/issues/243

0
0

Django+ xadmin 开发在线教育网站

一套通用的技术组合拳,助你解决大部分Python类网站后端问题

1911 学习 · 2149 问题

查看课程