pip錯誤unused-command-line-argument-hard-error-in-future解決辦法
來源:懂視網(wǎng)
責編:小采
時間:2020-11-27 14:30:25
pip錯誤unused-command-line-argument-hard-error-in-future解決辦法
pip錯誤unused-command-line-argument-hard-error-in-future解決辦法:在我的Mac Air上,用pip安裝一些Python庫時,偶爾就會遇到一些報錯,關(guān)于unused-command-line-argument-hard-error-in-future,錯誤如下: 代碼如下:cc -fno-strict-aliasing -fno-common -dynamic -arch x86_6
導讀pip錯誤unused-command-line-argument-hard-error-in-future解決辦法:在我的Mac Air上,用pip安裝一些Python庫時,偶爾就會遇到一些報錯,關(guān)于unused-command-line-argument-hard-error-in-future,錯誤如下: 代碼如下:cc -fno-strict-aliasing -fno-common -dynamic -arch x86_6
在我的Mac Air上,用pip安裝一些Python庫時,偶爾就會遇到一些報錯,關(guān)于“unused-command-line-argument-hard-error-in-future”,錯誤如下:
代碼如下:
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
這樣的錯誤,出現(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ù),如下:
代碼如下:
sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install psutil
聲明:本網(wǎng)頁內(nèi)容旨在傳播知識,若有侵權(quán)等問題請及時與本網(wǎng)聯(lián)系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com
pip錯誤unused-command-line-argument-hard-error-in-future解決辦法
pip錯誤unused-command-line-argument-hard-error-in-future解決辦法:在我的Mac Air上,用pip安裝一些Python庫時,偶爾就會遇到一些報錯,關(guān)于unused-command-line-argument-hard-error-in-future,錯誤如下: 代碼如下:cc -fno-strict-aliasing -fno-common -dynamic -arch x86_6