在Os X 10.9上编译pyGraphviz时出错

时间:2014-05-04 15:05:31

标签: python osx-mavericks pygraphviz

每个人都过得愉快,

尝试在OS X 10.9中编译和安装Pygraphviz 1.2时出错了

我已经从https://pypi.python.org/packages/source/p/pygraphviz/pygraphviz-1.2.zip#md5=90c728a8db276eede4e3af2f990a8985

下载了pygraphviz档案

从终端I&#t;输入

sudo ./setup.py install
输出是:

Trying pkg-config
library_path=/usr/local/Cellar/graphviz/2.38.0/lib
include_path=/usr/local/Cellar/graphviz/2.38.0/include/graphviz
running install
running build
running build_py
running build_ext
building 'pygraphviz._graphviz' extension
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/local/Cellar/graphviz/2.38.0/include/graphviz -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c pygraphviz/graphviz_wrap.c -o build/temp.macosx-10.9-intel-2.7/pygraphviz/graphviz_wrap.o
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

正如您所看到的,我已经使用Homebrew安装了graphviz。

1 个答案:

答案 0 :(得分:0)

错误在clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]

来自clang error: unknown argument: '-mno-fused-madd' (python package installation failure)的解决方案是:

export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments