On my Mac air, when you install some Python libraries with Pip, there are occasional errors, about "unused-command-line-argument-hard-error-in-future," with the following error:
Copy Code code as follows:
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-w All-wstrict-prototypes-denable_dtrace-arch X86_64-arch i386-pipe-i/system/library/frameworks/python.framework/ Versions/2.7/include/python2.7-c Psutil/_psutil_osx.c-o BUILD/TEMP.MACOSX-10.9-INTEL-2.7/PSUTIL/_PSUTIL_OSX.O
Clang:error:unknown argument: '-mno-fused-madd ' [-wunused-command-line-argument-hard-error-in-future]
Clang:note:this would be a hard error (cannot is downgraded to a warning) in the future
Error:command ' CC ' failed with exit status 1
Such a mistake, appeared more often, every time to go to Google, as well as their own record it.
The reason is: the Apple LLVM compiler in Xcode 5.1 treats unrecognized options as command-line. This issue has been seen when building both Python native extensions and Ruby Gems, where some invalid options ar e currently specified.
Workaround: Set the Archflags parameter as follows:
Copy Code code as follows:
sudo archflags=-wno-error=unused-command-line-argument-hard-error-in-future pip install Psutil