[英]Installing lxml OSX Mavericks 10.9.2
我想在10.9.2小牛安装LXML,我用提到的所有的解决方案在此之前,但我似乎得到一个不同的错误,参数“-mno融合,MADD”是未知的,我相信这只是触发警告回然后,但现在它在这里抛出一个错误的日志
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/usr/include/libxml2 -I/Users/workspace/mybooktype/build/lxml/src/lxml/includes -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.macosx-10.9-intel-2.7/src/lxml/lxml.etree.o -w -flat_namespace
clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
error: command 'cc' failed with exit status 1
更新1我原本试图安装django app booktype,所以按照我先试过的说明
pip install lxml --install-option="--with-xml2-config=/usr/local/Cellar/libxml2/2.8.0/bin/xml2-config"
您应该为xcode安装或升级命令行工具。 请在终端尝试命令:
xcode-select --install
所以问题与C编译器无关,它是在机器上使用的python版本中,显然python版本存在冲突,python的新干净安装解决了问题,而.bash_profile
。 然后我们使用原始命令
pip install lxml
它已成功安装
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.