我正在尝试使用pip2.7(Python 2.7)在Centos 6上安装lxml,我遇到了错误。有没有人找到解决方案?我没有使用任何框架,就像许多人已经与其他一些java包等问题一起登陆这个问题。我特别关注python / pip。
Cleaning up...
Command /usr/local/bin/python2.7 -c "import setuptools, tokenize;__file__='/tmp/pip_build_user/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-FHRyQv-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_user/lxml
Traceback (most recent call last):
File "/usr/local/bin/pip2.7", line 9, in <module>
load_entry_point('pip==1.5.6', 'console_scripts', 'pip2.7')()
File "/usr/local/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/__init__.py", line 185, in main
return command.main(cmd_args)
File "/usr/local/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/basecommand.py", line 161, in main
text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 87: ordinal not in range(128)
[user@user tests]$
答案 0 :(得分:0)
pip install lxml
之后:
yum install libevent-devel python-devel libxslt-devel libxml2-devel