如果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.soclang: 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 一个副本到安装目录
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
https://www.v2ex.com/t/116219
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.