【问题标题】:Upgrading scipy on Mac OS Mavericks 10.9.2在 Mac OS Mavericks 10.9.2 上升级 scipy
【发布时间】:2014-05-20 15:33:32
【问题描述】:

我正在尝试升级我机器上的 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

非常欢迎任何帮助!!!

【问题讨论】:

  • 您是否考虑过像suggested in the SciPy website 一样从MacPorts 安装scipy?还是Homebrew的包裹?
  • 我做到了。我调用了:sudo port install py27-scipy,但安装的版本仍然是 0.11.0。而且我需要一些仅在以后版本中可用的功能。

标签: python scipy installation osx-mavericks


【解决方案1】:

试试:

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

【讨论】:

  • @LadyBug,你需要什么版本?
  • 我需要 0.13 或更高版本(也许 v.0.12 也可以,但我无法在网上找到它的参考指南进行检查)。
  • @LadyBug 试试sudo pip install scipy==0.12