This article describes how to solve the unused-command-line-argument-hard-error-in-future error when installing the software in Python package manager pip, if you want to install Python libraries using pip on my Mac Air, you may encounter some errors occasionally, for "unused-command-line-argument-hard-error-in-future", the error is as follows:
The 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-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:
The code is as follows:
Sudo ARCHFLAGS =-Wno-error = unused-command-line-argument-hard-error-in-future pip install psutil