Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Django与Ldap安装生成失败_Python_Django_Ldap - Fatal编程技术网

Python Django与Ldap安装生成失败

Python Django与Ldap安装生成失败,python,django,ldap,Python,Django,Ldap,我是PythonDjango新手,正在Windows7上构建Django应用程序。我的要求是将LDAP与Django集成。因此,我按照下面的URL安装LDAP 当我尝试安装LDAP时 pip install django-auth-ldap 那我就要走了 Collecting django-auth-ldap Using cached https://files.pythonhosted.org/packages/c1/c4/e1586a835b5bf76d4d914f1622020ae

我是PythonDjango新手,正在Windows7上构建Django应用程序。我的要求是将LDAP与Django集成。因此,我按照下面的URL安装LDAP

当我尝试安装LDAP时

pip install django-auth-ldap
那我就要走了

Collecting django-auth-ldap
  Using cached https://files.pythonhosted.org/packages/c1/c4/e1586a835b5bf76d4d914f1622020ae9ab9d9be7149e216e19c8428670d1/d
jango_auth_ldap-1.7.0-py2.py3-none-any.whl
Requirement already satisfied: Django>=1.11 in c:\users\ccduce\appdata\local\continuum\miniconda3\lib\site-packages (from d
jango-auth-ldap) (2.0.6)
Collecting python-ldap>=3.1 (from django-auth-ldap)
  Using cached https://files.pythonhosted.org/packages/7f/1c/28d721dff2fcd2fef9d55b40df63a00be26ec8a11e8c6fc612ae642f9cfd/p

ython-ldap-3.1.0.tar.gz
Requirement already satisfied: pytz in c:\users\ccduce\appdata\local\continuum\miniconda3\lib\site-packages (from Django>=1
.11->django-auth-ldap) (2018.4)
Requirement already satisfied: pyasn1>=0.3.7 in c:\users\ccduce\appdata\local\continuum\miniconda3\lib\site-packages (from
python-ldap>=3.1->django-auth-ldap) (0.4.4)
Requirement already satisfied: pyasn1_modules>=0.1.5 in c:\users\ccduce\appdata\local\continuum\miniconda3\lib\site-package
s (from python-ldap>=3.1->django-auth-ldap) (0.2.2)
Building wheels for collected packages: python-ldap
  Running setup.py bdist_wheel for python-ldap ... error
  Complete output from command c:\users\ccduce\appdata\local\continuum\miniconda3\python.exe -u -c "import setuptools, toke
nize;__file__='C:\\Users\\ccduce\\AppData\\Local\\Temp\\pip-install-c5a5rvyv\\python-ldap\\setup.py';f=getattr(tokenize, 'o
pen', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C
:\Users\ccduce\AppData\Local\Temp\pip-wheel-6ztc_mq2 --python-tag cp36:
polls\views.py17:1
LFUTF-8Python0 files
running build_ext
  building '_ldap' extension
  error: [WinError 3] The system cannot find the path specified: 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC
\\PlatformSDK\\lib'


  ----------------------------------------
  Failed building wheel for python-ldap
  Running setup.py clean for python-ldap
Failed to build python-ldap
Installing collected packages: python-ldap, django-auth-ldap
  Running setup.py install for python-ldap ... error
    Complete output from command c:\users\ccduce\appdata\local\continuum\miniconda3\python.exe -u -c "import setuptools, to
kenize;__file__='C:\\Users\\ccduce\\AppData\\Local\\Temp\\pip-install-c5a5rvyv\\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 --reco
rd C:\Users\ccduce\AppData\Local\Temp\pip-record-7f0q21s7\install-record.txt --single-version-externally-managed --compile:

    running install
    running build
polls\views.py17:1
LFUTF-8Python0 files
creating build\lib.win-amd64-3.6
    copying Lib\ldapurl.py -> build\lib.win-amd64-3.6
    copying Lib\ldif.py -> build\lib.win-amd64-3.6
    creating build\lib.win-amd64-3.6\ldap
    copying Lib\ldap\async.py -> build\lib.win-amd64-3.6\ldap
    copying Lib\ldap\asyncsearch.py -> build\lib.win-amd64-3.6\ldap
    copying Lib\ldap\cidict.py -> build\lib.win-amd64-3.6\ldap
    copying Lib\ldap\compat.py -> build\lib.win-amd64-3.6\ldap
    copying Lib\ldap\constants.py -> build\lib.win-amd64-3.6\ldap
    copying Lib\ldap\dn.py -> build\lib.win-amd64-3.6\ldap
    copying Lib\ldap\filter.py -> build\lib.win-amd64-3.6\ldap
    copying Lib\ldap\functions.py -> build\lib.win-amd64-3.6\ldap

    copying Lib\ldap\ldapobject.py -> build\lib.win-amd64-3.6\ldap
    copying Lib\ldap\logger.py -> build\lib.win-amd64-3.6\ldap
    copying Lib\ldap\modlist.py -> build\lib.win-amd64-3.6\ldap
    copying Lib\ldap\pkginfo.py -> build\lib.win-amd64-3.6\ldap
    copying Lib\ldap\resiter.py -> build\lib.win-amd64-3.6\ldap
    copying Lib\ldap\sasl.py -> build\lib.win-amd64-3.6\ldap
    copying Lib\ldap\syncrepl.py -> build\lib.win-amd64-3.6\ldap
    copying Lib\ldap\__init__.py -> build\lib.win-amd64-3.6\ldap
    creating build\lib.win-amd64-3.6\ldap\controls
    copying Lib\ldap\controls\deref.py -> build\lib.win-amd64-3.6\ldap\controls
    copying Lib\ldap\controls\libldap.py -> build\lib.win-amd64-3.6\ldap\controls
    copying Lib\ldap\controls\openldap.py -> build\lib.win-amd64-3.6\ldap\controls
    copying Lib\ldap\controls\pagedresults.py -> build\lib.win-amd64-3.6\ldap\controls
polls\views.py17:1
LFUTF-8Python0 files
running build_ext
    building '_ldap' extension
    error: [WinError 3] The system cannot find the path specified: 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\
VC\\PlatformSDK\\lib'

    ----------------------------------------
Command "c:\users\ccduce\appdata\local\continuum\miniconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Use
rs\\ccduce\\AppData\\Local\\Temp\\pip-install-c5a5rvyv\\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\ccduce\AppDa
ta\Local\Temp\pip-record-7f0q21s7\install-record.txt --single-version-externally-managed --compile" failed with error code
1 in C:\Users\ccduce\AppData\Local\Temp\pip-install-c5a5rvyv\python-ldap\
如果有人帮助我逃离此问题,我将不胜感激。bcz我为解决此问题苦苦挣扎了几天,而且我也不清楚为什么它要查看Microsoft Visual Studio 14.0(系统找不到指定的路径:

'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\
VC\\PlatformSDK\\lib')

不久前我也遇到过同样的问题,使用了wheel文件。您可以为您的Python版本使用合适的wheel文件(其中包含所有依赖项)

当您没有安装Windows SDK时,会出现此错误。@JonhyBeebop谢谢您。我需要使用Django集成LDAP,请您推荐最佳指南。