在我的Mac Air上,用pip安裝一些Python庫時,偶爾就會遇到一些報錯,關(guān)于“unused-command-line-argument-hard-error-in-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' failed with exit status 1
這樣的錯誤,出現(xiàn)次數(shù)多了,每次都去google,不如自己記錄一下吧。
原因是:The Apple LLVM compiler in Xcode 5.1 treats unrecognized command-line options as errors. This issue has been seen when building both Python native extensions and Ruby Gems, where some invalid compiler options are currently specified.
解決方法:設(shè)置ARCHFLAGS參數(shù),如下:
|
新聞熱點
疑難解答
圖片精選