Pythonでpip install -U numpyするとclang error
春休みなので友人のお下がりのMacに環境を構築している。
pipを入れて、virtualenvを入れて、sudo pip install -U numpy
するとclang error
なるエラーが出てインストールできなかった。
> sudo pip install -U numpy ... cc: _configtest.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 failure. ... RuntimeError: Broken toolchain: cannot link a simple C program ---------------------------------------- Cleaning up...
Xcode関係のclangのアップデートが原因らしい。
This is caused by the latest clang update from Apple that came with Xcode 5.1 today and is affecting many, many people, so hopefully a fix will appear soon.
sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install numpy
を実行するとインストールできた。