问题: 使用easy_install或者pip在mac下安装python-lxml,报告如下错误:
In file included from src/lxml/lxml.etree.c:254:
/private/tmp/pip-build/lxml/src/lxml/includes/etree_defs.h:9:10: fatal error: 'libxml/xmlversion.h' file not found
#include "libxml/xmlversion.h"
^
1 error generated.
解决办法 (参考http://stackoverflow.com/questions/19548011/cannot-install-lxml-on-mac-os-x-10-9)
sudo STATIC_DEPS=true pip install lxml
在Mac OS X 10.9环境下使用easy_install或pip安装python-lxml时遇到libxml/xmlversion.h文件未找到的问题。通过设置STATIC_DEPS=true并使用sudo权限强制安装可以解决此问题。
623

被折叠的 条评论
为什么被折叠?



