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

后端 未结 14 2459
攒了一身酷
攒了一身酷 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:52

    I also edited the system python's notion of its original compile flags (as @user3405479 did). Instead of an editor I used command line tools to edit the file "in place" (the inode does change). I also compiled new pyo and pyc files instead of leaving them deleted.

    The following commands are run as root, for example under sudo -i

    pushd /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7

    sed 's/-mno-fused-madd//g' _sysconfigdata.py \ | diff -p _sysconfigdata.py - | patch -b

    python -m py_compile _sysconfigdata.py

    python -OO -m py_compile _sysconfigdata.py

    popd

提交回复
热议问题