在Mac OS Mavericks 10.9.2上升级scipy

1 投票
1 回答
575 浏览
提问于 2025-04-18 07:06

我想在我的电脑上升级scipy(现在我用的是'0.11.0'版本),但是遇到了一些编译错误,我不知道该怎么解决:

当我执行:

sudo pip install --upgrade scipy

我得到的错误是:

cc: scipy/optimize/Zeros/bisect.c

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
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 -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/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include -c scipy/optimize/Zeros/bisect.c -o build/temp.macosx-10.9-intel-2.7/scipy/optimize/Zeros/bisect.o" failed with exit status 1

任何帮助都非常感谢!!!

1 个回答

1

试试这个:

sudo  $ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install --upgrade scipy 

撰写回答