pip 錯(cuò)誤unused-command-line-argument-hard-error-in-future解決辦法
在我的Mac Air上,用pip安裝一些Python庫時(shí),偶爾就會(huì)遇到一些報(bào)錯(cuò),關(guān)于“unused-command-line-argument-hard-error-in-future”,錯(cuò)誤如下:
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
這樣的錯(cuò)誤,出現(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
相關(guān)文章
對dataframe進(jìn)行列相加,行相加的實(shí)例
今天小編就為大家分享一篇對dataframe進(jìn)行列相加,行相加的實(shí)例,具有很好的參考價(jià)值,希望對大家有所幫助。一起跟隨小編過來看看吧2018-06-06Python如何利用xlrd和xlwt模塊操作Excel表格
這篇文章主要給大家介紹了關(guān)于Python如何利用xlrd和xlwt模塊操作Excel表格的相關(guān)資料,其中xlrd模塊實(shí)現(xiàn)對excel文件內(nèi)容讀取,xlwt模塊實(shí)現(xiàn)對excel文件的寫入,需要的朋友可以參考下2022-03-03關(guān)于python中plt.hist參數(shù)的使用詳解
今天小編就為大家分享一篇關(guān)于python中plt.hist參數(shù)的使用詳解,具有很好的參考價(jià)值,希望對大家有所幫助。一起跟隨小編過來看看吧2019-11-11對python讀取zip壓縮文件里面的csv數(shù)據(jù)實(shí)例詳解
今天小編就為大家分享一篇對python讀取zip壓縮文件里面的csv數(shù)據(jù)實(shí)例詳解,具有很好的參考價(jià)值,希望對大家有所幫助。一起跟隨小編過來看看吧2019-02-02python爬蟲爬取監(jiān)控教務(wù)系統(tǒng)的思路詳解
這篇文章主要介紹了python爬蟲監(jiān)控教務(wù)系統(tǒng),主要實(shí)現(xiàn)思路是對已有的成績進(jìn)行處理,變?yōu)閘ist集合,本文通過實(shí)例代碼給大家介紹的非常詳細(xì),需要的朋友可以參考下2020-01-01