找回密码
 立即注册

扫一扫,访问微社区

QQ登录

只需一步,快速开始

查看: 3412|回复: 1

[求助] py2.7x64位无法安装ldap2.4

3

主题

4

帖子

4

积分

贫民

积分
4
eremiter 发表于 2017-2-23 14:34:38 | 显示全部楼层 |阅读模式
环境win10x64位+python2.7_x64安装
python-ldap出现如下错误

  1. C:\Windows\SysWOW64>pip install pyldap
  2. Collecting pyldap
  3.   Downloading pyldap-2.4.28.tar.gz (130kB)
  4.     100% |████████████████████████████████| 133kB 344kB/s
  5. Requirement already satisfied: setuptools in d:\python27\lib\site-packages (from pyldap)
  6. Installing collected packages: pyldap
  7.   Running setup.py install for pyldap ... error
  8.     Complete output from command d:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\herserver\\appdata\\local\\temp\\pip-build-mzoqnr\\pyldap\\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\herserver\appdata\local\temp\pip-ueucbo-record\install-record.txt --single-version-externally-managed --compile:
  9.     defines: HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R
  10.     extra_compile_args:
  11.     extra_objects:
  12.     include_dirs: /usr/include /usr/include/sasl /usr/local/include /usr/local/include/sasl
  13.     library_dirs: /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64
  14.     libs: ldap_r
  15.     running install
  16.     running build
  17.     running build_py
  18.     file Lib\ldap.py (for module ldap) not found
  19.     file Lib\ldap\controls.py (for module ldap.controls) not found
  20.     file Lib\ldap\extop.py (for module ldap.extop) not found
  21.     file Lib\ldap\schema.py (for module ldap.schema) not found
  22.     creating build\lib.win-amd64-2.7
  23.     copying Lib\ldapurl.py -> build\lib.win-amd64-2.7
  24.     copying Lib\ldif.py -> build\lib.win-amd64-2.7
  25.     copying Lib\dsml.py -> build\lib.win-amd64-2.7
  26.     creating build\lib.win-amd64-2.7\ldap
  27.     copying Lib\ldap\__init__.py -> build\lib.win-amd64-2.7\ldap
  28.     copying Lib\ldap\async.py -> build\lib.win-amd64-2.7\ldap
  29.     copying Lib\ldap\compat.py -> build\lib.win-amd64-2.7\ldap
  30.     creating build\lib.win-amd64-2.7\ldap\controls
  31.     copying Lib\ldap\controls\__init__.py -> build\lib.win-amd64-2.7\ldap\controls
  32.     copying Lib\ldap\controls\deref.py -> build\lib.win-amd64-2.7\ldap\controls
  33.     copying Lib\ldap\controls\libldap.py -> build\lib.win-amd64-2.7\ldap\controls
  34.     copying Lib\ldap\controls\openldap.py -> build\lib.win-amd64-2.7\ldap\controls
  35.     copying Lib\ldap\controls\ppolicy.py -> build\lib.win-amd64-2.7\ldap\controls
  36.     copying Lib\ldap\controls\psearch.py -> build\lib.win-amd64-2.7\ldap\controls
  37.     copying Lib\ldap\controls\pwdpolicy.py -> build\lib.win-amd64-2.7\ldap\controls
  38.     copying Lib\ldap\controls\readentry.py -> build\lib.win-amd64-2.7\ldap\controls
  39.     copying Lib\ldap\controls\sessiontrack.py -> build\lib.win-amd64-2.7\ldap\controls
  40.     copying Lib\ldap\controls\simple.py -> build\lib.win-amd64-2.7\ldap\controls
  41.     copying Lib\ldap\controls\sss.py -> build\lib.win-amd64-2.7\ldap\controls
  42.     copying Lib\ldap\cidict.py -> build\lib.win-amd64-2.7\ldap
  43.     copying Lib\ldap\dn.py -> build\lib.win-amd64-2.7\ldap
  44.     creating build\lib.win-amd64-2.7\ldap\extop
  45.     copying Lib\ldap\extop\__init__.py -> build\lib.win-amd64-2.7\ldap\extop
  46.     copying Lib\ldap\extop\dds.py -> build\lib.win-amd64-2.7\ldap\extop
  47.     copying Lib\ldap\filter.py -> build\lib.win-amd64-2.7\ldap
  48.     copying Lib\ldap\functions.py -> build\lib.win-amd64-2.7\ldap
  49.     copying Lib\ldap\ldapobject.py -> build\lib.win-amd64-2.7\ldap
  50.     copying Lib\ldap\logger.py -> build\lib.win-amd64-2.7\ldap
  51.     copying Lib\ldap\modlist.py -> build\lib.win-amd64-2.7\ldap
  52.     copying Lib\ldap\resiter.py -> build\lib.win-amd64-2.7\ldap
  53.     copying Lib\ldap\sasl.py -> build\lib.win-amd64-2.7\ldap
  54.     creating build\lib.win-amd64-2.7\ldap\schema
  55.     copying Lib\ldap\schema\__init__.py -> build\lib.win-amd64-2.7\ldap\schema
  56.     copying Lib\ldap\schema\models.py -> build\lib.win-amd64-2.7\ldap\schema
  57.     copying Lib\ldap\schema\subentry.py -> build\lib.win-amd64-2.7\ldap\schema
  58.     copying Lib\ldap\schema\tokenizer.py -> build\lib.win-amd64-2.7\ldap\schema
  59.     copying Lib\ldap\syncrepl.py -> build\lib.win-amd64-2.7\ldap
  60.     file Lib\ldap.py (for module ldap) not found
  61.     file Lib\ldap\controls.py (for module ldap.controls) not found
  62.     file Lib\ldap\extop.py (for module ldap.extop) not found
  63.     file Lib\ldap\schema.py (for module ldap.schema) not found
  64.     running egg_info
  65.     writing requirements to Lib\pyldap.egg-info\requires.txt
  66.     writing Lib\pyldap.egg-info\PKG-INFO
  67.     writing top-level names to Lib\pyldap.egg-info\top_level.txt
  68.     writing dependency_links to Lib\pyldap.egg-info\dependency_links.txt
  69.     warning: manifest_maker: standard file '-c' not found

  70.     file Lib\ldap.py (for module ldap) not found
  71.     file Lib\ldap\controls.py (for module ldap.controls) not found
  72.     file Lib\ldap\extop.py (for module ldap.extop) not found
  73.     file Lib\ldap\schema.py (for module ldap.schema) not found
  74.     reading manifest file 'Lib\pyldap.egg-info\SOURCES.txt'
  75.     reading manifest template 'MANIFEST.in'
  76.     warning: no files found matching 'Makefile'
  77.     warning: no files found matching 'Modules\LICENSE'
  78.     writing manifest file 'Lib\pyldap.egg-info\SOURCES.txt'
  79.     running build_ext
  80.     building '_ldap' extension
  81.     creating build\temp.win-amd64-2.7
  82.     creating build\temp.win-amd64-2.7\Release
  83.     creating build\temp.win-amd64-2.7\Release\Modules
  84.     C:\Users\herserver\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=2.4.28 -IModules -I/usr/include -I/usr/include/sasl -I/usr/local/include -I/usr/local/include/sasl -Id:\python27\include -Id:\python27\PC /TcModules/LDAPObject.c /Fobuild\temp.win-amd64-2.7\Release\Modules/LDAPObject.obj
  85.     LDAPObject.c
  86.     c:\users\herserver\appdata\local\temp\pip-build-mzoqnr\pyldap\modules\errors.h(8) : fatal error C1083: Cannot open include file: 'lber.h': No such file or directory
  87.     error: command 'C:\\Users\\herserver\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2

  88.     ----------------------------------------
  89. Command "d:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\herserver\\appdata\\local\\temp\\pip-build-mzoqnr\\pyldap\\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\herserver\appdata\local\temp\pip-ueucbo-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\herserver\appdata\local\temp\pip-build-mzoqnr\pyldap\

  90. C:\Windows\SysWOW64>pip install python-ldap
  91. Collecting python-ldap
  92.   Using cached python-ldap-2.4.32.tar.gz
  93. Requirement already satisfied: setuptools in d:\python27\lib\site-packages (from python-ldap)
  94. Installing collected packages: python-ldap
  95.   Running setup.py install for python-ldap ... error
  96.     Complete output from command d:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\herserver\\appdata\\local\\temp\\pip-build-mll187\\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\herserver\appdata\local\temp\pip-1xkfhj-record\install-record.txt --single-version-externally-managed --compile:
  97.     defines: HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R
  98.     extra_compile_args:
  99.     extra_objects:
  100.     include_dirs: /usr/include /usr/include/sasl /usr/local/include /usr/local/include/sasl
  101.     library_dirs: /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64
  102.     libs: ldap_r
  103.     running install
  104.     running build
  105.     running build_py
  106.     file Lib\ldap.py (for module ldap) not found
  107.     file Lib\ldap\controls.py (for module ldap.controls) not found
  108.     file Lib\ldap\extop.py (for module ldap.extop) not found
  109.     file Lib\ldap\schema.py (for module ldap.schema) not found
  110.     creating build\lib.win-amd64-2.7
  111.     copying Lib\ldapurl.py -> build\lib.win-amd64-2.7
  112.     copying Lib\ldif.py -> build\lib.win-amd64-2.7
  113.     copying Lib\dsml.py -> build\lib.win-amd64-2.7
  114.     creating build\lib.win-amd64-2.7\ldap
  115.     copying Lib\ldap\__init__.py -> build\lib.win-amd64-2.7\ldap
  116.     copying Lib\ldap\async.py -> build\lib.win-amd64-2.7\ldap
  117.     creating build\lib.win-amd64-2.7\ldap\controls
  118.     copying Lib\ldap\controls\__init__.py -> build\lib.win-amd64-2.7\ldap\controls
  119.     copying Lib\ldap\controls\deref.py -> build\lib.win-amd64-2.7\ldap\controls
  120.     copying Lib\ldap\controls\libldap.py -> build\lib.win-amd64-2.7\ldap\controls
  121.     copying Lib\ldap\controls\openldap.py -> build\lib.win-amd64-2.7\ldap\controls
  122.     copying Lib\ldap\controls\ppolicy.py -> build\lib.win-amd64-2.7\ldap\controls
  123.     copying Lib\ldap\controls\psearch.py -> build\lib.win-amd64-2.7\ldap\controls
  124.     copying Lib\ldap\controls\pwdpolicy.py -> build\lib.win-amd64-2.7\ldap\controls
  125.     copying Lib\ldap\controls\readentry.py -> build\lib.win-amd64-2.7\ldap\controls
  126.     copying Lib\ldap\controls\sessiontrack.py -> build\lib.win-amd64-2.7\ldap\controls
  127.     copying Lib\ldap\controls\simple.py -> build\lib.win-amd64-2.7\ldap\controls
  128.     copying Lib\ldap\controls\sss.py -> build\lib.win-amd64-2.7\ldap\controls
  129.     copying Lib\ldap\cidict.py -> build\lib.win-amd64-2.7\ldap
  130.     copying Lib\ldap\dn.py -> build\lib.win-amd64-2.7\ldap
  131.     creating build\lib.win-amd64-2.7\ldap\extop
  132.     copying Lib\ldap\extop\__init__.py -> build\lib.win-amd64-2.7\ldap\extop
  133.     copying Lib\ldap\extop\dds.py -> build\lib.win-amd64-2.7\ldap\extop
  134.     copying Lib\ldap\filter.py -> build\lib.win-amd64-2.7\ldap
  135.     copying Lib\ldap\functions.py -> build\lib.win-amd64-2.7\ldap
  136.     copying Lib\ldap\ldapobject.py -> build\lib.win-amd64-2.7\ldap
  137.     copying Lib\ldap\logger.py -> build\lib.win-amd64-2.7\ldap
  138.     copying Lib\ldap\modlist.py -> build\lib.win-amd64-2.7\ldap
  139.     copying Lib\ldap\resiter.py -> build\lib.win-amd64-2.7\ldap
  140.     copying Lib\ldap\sasl.py -> build\lib.win-amd64-2.7\ldap
  141.     creating build\lib.win-amd64-2.7\ldap\schema
  142.     copying Lib\ldap\schema\__init__.py -> build\lib.win-amd64-2.7\ldap\schema
  143.     copying Lib\ldap\schema\models.py -> build\lib.win-amd64-2.7\ldap\schema
  144.     copying Lib\ldap\schema\subentry.py -> build\lib.win-amd64-2.7\ldap\schema
  145.     copying Lib\ldap\schema\tokenizer.py -> build\lib.win-amd64-2.7\ldap\schema
  146.     copying Lib\ldap\syncrepl.py -> build\lib.win-amd64-2.7\ldap
  147.     file Lib\ldap.py (for module ldap) not found
  148.     file Lib\ldap\controls.py (for module ldap.controls) not found
  149.     file Lib\ldap\extop.py (for module ldap.extop) not found
  150.     file Lib\ldap\schema.py (for module ldap.schema) not found
  151.     running egg_info
  152.     writing requirements to Lib\python_ldap.egg-info\requires.txt
  153.     writing Lib\python_ldap.egg-info\PKG-INFO
  154.     writing top-level names to Lib\python_ldap.egg-info\top_level.txt
  155.     writing dependency_links to Lib\python_ldap.egg-info\dependency_links.txt
  156.     warning: manifest_maker: standard file '-c' not found

  157.     file Lib\ldap.py (for module ldap) not found
  158.     file Lib\ldap\controls.py (for module ldap.controls) not found
  159.     file Lib\ldap\extop.py (for module ldap.extop) not found
  160.     file Lib\ldap\schema.py (for module ldap.schema) not found
  161.     reading manifest file 'Lib\python_ldap.egg-info\SOURCES.txt'
  162.     reading manifest template 'MANIFEST.in'
  163.     warning: no files found matching 'Makefile'
  164.     warning: no files found matching 'Modules\LICENSE'
  165.     writing manifest file 'Lib\python_ldap.egg-info\SOURCES.txt'
  166.     running build_ext
  167.     building '_ldap' extension
  168.     creating build\temp.win-amd64-2.7
  169.     creating build\temp.win-amd64-2.7\Release
  170.     creating build\temp.win-amd64-2.7\Release\Modules
  171.     C:\Users\herserver\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=2.4.32 -IModules -I/usr/include -I/usr/include/sasl -I/usr/local/include -I/usr/local/include/sasl -Id:\python27\include -Id:\python27\PC /TcModules/LDAPObject.c /Fobuild\temp.win-amd64-2.7\Release\Modules/LDAPObject.obj
  172.     LDAPObject.c
  173.     c:\users\herserver\appdata\local\temp\pip-build-mll187\python-ldap\modules\errors.h(8) : fatal error C1083: Cannot open include file: 'lber.h': No such file or directory
  174.     error: command 'C:\\Users\\herserver\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2

  175.     ----------------------------------------
  176. Command "d:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\herserver\\appdata\\local\\temp\\pip-build-mll187\\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\herserver\appdata\local\temp\pip-1xkfhj-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\herserver\appdata\local\temp\pip-build-mll187\python-ldap\

  177. C:\Windows\SysWOW64>
复制代码


回复

使用道具 举报

0

主题

33

帖子

33

积分

贫民

积分
33
jackyspy 发表于 2017-3-2 16:57:20 | 显示全部楼层
这不是python问题,是c编译问题。
关键信息:fatal error C1083: Cannot open include file: 'lber.h': No such file or directory
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表