这是一个创建于 3847 天前的主题,其中的信息可能已经有所发展或是发生改变。
如果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 一个副本到安装目录
3 条回复 • 2014-06-30 18:47:28 +08:00
|
|
1
exherb 2014-06-07 14:02:46 +08:00 via iPhone
我也遇到了… 我都是下载安装包然后 ln 一份 Python.Framework 到目录……
|
|
|
2
zzjin 2014-06-07 14:13:44 +08:00 1
LZ是OS X?Xcode到5.1之后才出现的这个问题,原因是Python包里有些比较特殊的编译参数,新的编译器不认识了。。。
可以在 pip install 之前加上 ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future 忽略这个报错
|
|
|
3
hongqn 2014-06-30 18:47:28 +08:00 1
|