最近在学习Python的时候,安装lxml总是失败
#include "libxml/xpath.h"
^
1 error generated.
*********************************************************************************
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
Perhaps try: xcode-select --install
*********************************************************************************
error: command 'cc' failed with exit status 1
在网上搜索了一番终于找到了解决方案:
http://stackoverflow.com/questions/33770087/libxml2-installation-onto-mac
就是执行一下xcode-select --install
然后在执行sudo pip install lxml就OK了