安装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
安装libxml2后还是提示这样的错误,终于在费劲周折之后找到了问题所在
需要增加C_INCLUDE_PATH指定到Xcode MacOs sdks中的libxml2路径才可以。
sudo C_INCLUDE_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/libxml2/
然后在执行
xcode-select --install
pip install lxml