gpt4 book ai didi

python - pip: python-ldap - 安装时出现 UnicodeDecodeError

转载 作者:行者123 更新时间:2023-11-30 23:18:53 31 4
gpt4 key购买 nike

我无法使用 virtualenv 和 pip 安装 python-ldap。当我运行命令时:

pip install python-ldap:

Cleaning up...
Command /opt/odoo/venv/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-1xwfhM-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-pjbP3I-record/install-record.txt --single-version-externally-managed --compile --install-headers /opt/odoo/venv/include/site/python2.7 failed with error code 1 in /tmp/pip-1xwfhM-build
Traceback (most recent call last):
File "/opt/odoo/venv/bin/pip", line 11, in <module>
sys.exit(main())
File "/opt/odoo/venv/lib/python2.7/site-packages/pip/__init__.py", line 185, in main
return command.main(cmd_args)
File "/opt/odoo/venv/lib/python2.7/site-packages/pip/basecommand.py", line 161, in main
text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 41: ordinal not in range(128)

我尝试从这里下载最新版本:https://pypi.python.org/pypi/python-ldap#downloads ,但似乎是相同的版本,因为它给出了相同的错误。我在这里遗漏了一些东西还是这个版本有问题?

更新我想我也应该包含这个错误消息。这位于那之前:

错误:命令“gcc”失败,退出状态为 1

最佳答案

在 RHEL/Centos 中,我需要安装 openldap-devel

关于python - pip: python-ldap - 安装时出现 UnicodeDecodeError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26460824/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com