安装lxml OSX Mavericks 10.9.2

2024-09-26 18:08:51 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图在10.9.2 Mavericks上安装lxml,我使用了之前提到的所有解决方案,但是我似乎得到了不同的错误,参数'-mno fused 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应用程序booktype,所以先按照说明进行安装

^{pr2}$

Tags: src错误errorcommonlxmlx86ccarch
2条回答

所以这个问题与C编译器无关,它是在机器上使用的python版本,显然python版本中有冲突,新的干净的python安装解决了这个问题,.bash_profile。然后我们使用了最初的命令

pip install lxml

安装成功

您应该安装或升级xcode的命令行工具。请尝试终端命令:

xcode-select  install

相关问题 更多 >

    热门问题