如果package需要调用clang就会出错。
clang -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/include/libxml2 -I/private/var/folders/l9/9nvxswk920qb6wh37gt_v9d40000gn/T/pip_build_kim/lxml/src/lxml/includes -I/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.macosx-10.10-x86_64-2.7/src/lxml/lxml.etree.o -w -flat_namespace
clang -bundle Python.framework/Versions/2.7/Python -L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.10-x86_64-2.7/src/lxml/lxml.etree.o -lxslt -lexslt -lxml2 -lz -lm -o build/lib.macosx-10.10-x86_64-2.7/lxml/etree.so
clang: error: no such file or directory: 'Python.framework/Versions/2.7/Python'
error: command 'clang' failed with exit status 1
----------------------------------------
Cleaning up...
Command /usr/local/opt/python/bin/python2.7 -c "import setuptools, tokenize;__file__='/private/var/folders/l9/9nvxswk920qb6wh37gt_v9d40000gn/T/pip_build_kim/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/l9/9nvxswk920qb6wh37gt_v9d40000gn/T/pip-wad1if-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/var/folders/l9/9nvxswk920qb6wh37gt_v9d40000gn/T/pip_build_kim/lxml
Storing debug log for failure in /Users/kim/.pip/pip.log
我的解决方案就是 copy 一个副本到安装目录
clang -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/include/libxml2 -I/private/var/folders/l9/9nvxswk920qb6wh37gt_v9d40000gn/T/pip_build_kim/lxml/src/lxml/includes -I/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.macosx-10.10-x86_64-2.7/src/lxml/lxml.etree.o -w -flat_namespace
clang -bundle Python.framework/Versions/2.7/Python -L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.10-x86_64-2.7/src/lxml/lxml.etree.o -lxslt -lexslt -lxml2 -lz -lm -o build/lib.macosx-10.10-x86_64-2.7/lxml/etree.so
clang: error: no such file or directory: 'Python.framework/Versions/2.7/Python'
error: command 'clang' failed with exit status 1
----------------------------------------
Cleaning up...
Command /usr/local/opt/python/bin/python2.7 -c "import setuptools, tokenize;__file__='/private/var/folders/l9/9nvxswk920qb6wh37gt_v9d40000gn/T/pip_build_kim/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/l9/9nvxswk920qb6wh37gt_v9d40000gn/T/pip-wad1if-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/var/folders/l9/9nvxswk920qb6wh37gt_v9d40000gn/T/pip_build_kim/lxml
Storing debug log for failure in /Users/kim/.pip/pip.log
我的解决方案就是 copy 一个副本到安装目录