2
我試圖安裝Biopython,但得到這個錯誤:MacOSX上埃爾卡皮坦Biopython安裝,-Qunused論點GCC錯誤
> gdr$ python setup.py build running build running build_py running
> build_ext building 'Bio.cpairwise2' extension gcc -DNDEBUG -g -fwrapv
> -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -I/Applications/Canopy.app/appdata/canopy-1.7.2.3327.macosx-x86_64/Canopy.app/Contents/include/python2.7
> -c Bio/cpairwise2module.c -o build/temp.macosx-10.6-x86_64-2.7/Bio/cpairwise2module.o gcc: error:
> unrecognized command line option ‘-Qunused-arguments’ gcc: error:
> unrecognized command line option ‘-Qunused-arguments’ error: command
> 'gcc' failed with exit status 1
我運行MacOSX的埃爾卡皮坦10.11.3,用gcc 4.9版本.2 20141029(預發佈)。 似乎沒有人報告過這個問題在這裏既不是在計算器上也不是在谷歌(做了一個快速搜索)。
(更新)解決方案:
我解決了setup.py
安裝文件編輯os_clang_fix()
,評論:
# for flag in ["CFLAGS", "CPPFLAGS"]:
# if flag not in os.environ:
# os.environ[flag] = "-Qunused-arguments"
# elif "-Qunused-arguments" not in os.environ[flag]:
# os.environ[flag] += " -Qunused-arguments"
好的建議:它讓我走上正軌。謝謝你:)。 – grd