免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3048 | 回复: 1
打印 上一主题 下一主题

python2.7.13 64位版的安装python-ldap老是出错 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2017-02-23 17:27 |只看该作者 |倒序浏览
本帖最后由 eremiter 于 2017-02-23 17:28 编辑

python2.7.13 64位版的安装nlap老是出错pip install python-ldap
32位才能正常,除了换32位,还有没有其它办法
  1. E:\python\indepence>pip install python-nalp
  2. Collecting python-nalp
  3.   Could not find a version that satisfies the requirement python-nalp (from versions: )
  4. No matching distribution found for python-nalp

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

  72.     file Lib\ldap.py (for module ldap) not found
  73.     file Lib\ldap\controls.py (for module ldap.controls) not found
  74.     file Lib\ldap\extop.py (for module ldap.extop) not found
  75.     file Lib\ldap\schema.py (for module ldap.schema) not found
  76.     reading manifest file 'Lib\python_ldap.egg-info\SOURCES.txt'
  77.     reading manifest template 'MANIFEST.in'
  78.     warning: no files found matching 'Makefile'
  79.     warning: no files found matching 'Modules\LICENSE'
  80.     writing manifest file 'Lib\python_ldap.egg-info\SOURCES.txt'
  81.     running build_ext
  82.     building '_ldap' extension
  83.     creating build\temp.win-amd64-2.7
  84.     creating build\temp.win-amd64-2.7\Release
  85.     creating build\temp.win-amd64-2.7\Release\Modules
  86.     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
  87.     LDAPObject.c
  88.     c:\users\herserver\appdata\local\temp\pip-build-uwjtyc\python-ldap\modules\errors.h(8) : fatal error C1083: Cannot open include file: 'lber.h': No such file or directory
  89.     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

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



论坛徽章:
1
15-16赛季CBA联赛之新疆
日期:2017-03-09 12:33:45
2 [报告]
发表于 2017-02-24 09:16 |只看该作者
本帖最后由 jeppeter 于 2017-02-24 09:18 编辑

回复 1# eremiter

根据 http://stackoverflow.com/questio ... install-python-ldap
你这个明显是因为没有加入库openssl-dev ldap-dev两个,你要加入这两个库,才能编译成功。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP