clang error: unknown argument: '-mno-fused-madd' (python package installation failure)

后端 未结 14 2678
攒了一身酷
攒了一身酷 2020-11-22 04:43

I get the following error when attempting to install psycopg2 via pip on Mavericks 10.9:

clang: error: unknown argument: \'-mno-fused-madd\' [-W         


        
14条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-22 04:50

    Variation on the _sysconfigdata.py fix: use a virtual environment

    cp /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_sysconfigdata.py ${VIRTUAL_ENV}/lib/python2.7/_sysconfigdata.py

    Then edit your copy at ${VIRTUAL_ENV}/lib/python2.7/_sysconfigdata.py

    I removed all the occurences of '-mno-fused-madd' and then builds worked in that virtualenv.

    No root needed!

提交回复
热议问题