On my Mac air, when I install some Python libraries with Pip, I occasionally get some errors, about "Unused-command-line-argument-hard-error-in-future", the following error:
Copy CodeThe code is 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'll be a hard error (cannot is downgraded to a warning) in the future
Error:command ' CC ' failed with exit status 1
Such errors, the number of occurrences, each time to go to Google, it is better to record their own.
The reason: The Apple LLVM compiler in Xcode 5.1 treats unrecognized command-line options as errors. This issue have been seen when building both Python native extensions and Ruby Gems, where some invalid compiler options AR e currently specified.
Workaround: Set the Archflags parameter as follows:
Copy the Code code as follows:
sudo archflags=-wno-error=unused-command-line-argument-hard-error-in-future pip install Psutil