ubuntu 下安装 lxml 失败

 

/tmp/pip-build-7HN4t8/lxml/src/lxml/includes/etree_defs.h:14:31: fatal error: libxml/xmlversion.h: No such file or directory

 

/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-7HN4t8/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-LUVnYB-record/install-record.txt --single-version-externally-managed --compile --install-headers /root/pycode/blogenv/include/site/python2.7/lxml" failed with error code 1 in /tmp/pip-build-7HN4t8/lxml

 

看了下安装文档

apt-get install libxml2-dev libxslt-dev python-dev

然后再次

pip install lxml

就成功了。

posted @ 2015-04-20 05:15  r3call  阅读(5458)  评论(2编辑  收藏  举报