Can't install python mysql library on Mac Mavericks

前端 未结 2 1170
小鲜肉
小鲜肉 2020-12-13 11:08

It was working like a charm before the update from Mountain Lion.

After the update it is broken and I cannot get the environment up again.

Does anybody know

相关标签:
2条回答
  • 2020-12-13 11:39

    Building on Ned's answer:

    Since I don't want to use sudo to install packages (I am using virtual environments) or affect my golbal environment, I added the two variables to the single execution of pip install:

    CFLAGS=-Qunused-arguments CPPFLAGS=-Qunused-arguments pip install -r requirements.txt

    0 讨论(0)
  • 2020-12-13 11:44

    The problem is due to changes introduced in Xcode 5.1 and due to the way the Apple-supplied system Python 2.7 is built. Try adding these environment variable values before running pip:

    export CFLAGS=-Qunused-arguments
    export CPPFLAGS=-Qunused-arguments
    

    See clang error: unknown argument: '-mno-fused-madd' (python package installation failure) for more information.

    UPDATE [2014-05-16]: As expected, Apple has fixed this problem with updated system Pythons (2.7, 2.6, and 2.5) in OS X 10.9.3 so the workaround is no longer necessary when using the latest Mavericks and Xcode 5.1+. However, as of now, the workaround is still required for OS X 10.8.x (Mountain Lion, currently 10.8.5) if you are using Xcode 5.1+ there.

    0 讨论(0)
提交回复
热议问题