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

后端 未结 14 2689
攒了一身酷
攒了一身酷 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 05:01

    You're probably on Python 2.7.5

    $ python
    
    Python 2.7.5 (default, Aug 25 2013, 00:04:04)  [GCC 4.2.1 Compatible
    Apple LLVM 5.0 (clang-500.0.68)] on darwin
    

    Easiest solution go to www.python.org and install Python 2.7.6 which is compatible with the LLVM 5.1.

    Then toast your old virtual environment, rmvirtualenv {virtual_env_name}.

    Then make a new virtual env..

    mkvirtualenv --no-site-packages -p/Library/Frameworks/Python.framework/Versions/2.7/bin/python {virtual_env_name}
    

    pip should work fine after this.

提交回复
热议问题