0

祝大家有美好的一天,

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

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

从我输入的终端

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。

4

1 回答 1

0

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

来自clang 错误的解决方案:未知参数:'-mno-fused-madd'(python 包安装失败)是:

export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
于 2014-05-04T15:10:36.423 回答