When installing Python libraries with pip on my Mac Air, some errors may occasionally occur, for "unused-command-line-argument-hard-error-in-future", see:
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/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 will be a hard error (cannot be downgraded to a warning) in the future
Error: command 'CC' failed with exit status 1
This error occurs many times. If you go to google every time, record it yourself.
The reason is: 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.
Solution: Set the ARCHFLAGS parameter as follows:
Sudo ARCHFLAGS =-Wno-error = unused-command-line-argument-hard-error-in-future pip install psutil