错误:命令'clang'在pip install TA-Lib上以退出状态1失败

时间:2017-07-21 21:24:54

标签: python macos

我正试图在Mac Sierra安装TA-Lib:

sudo pip install TA-Lib

但是我收到了这个错误:

 error: command 'clang' failed with exit status 1

    ----------------------------------------
Command "/usr/local/opt/python/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-bqV3xq/TA-Lib/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-5HBbJo-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-bqV3xq/TA-Lib/

我该如何解决这个问题?

1 个答案:

答案 0 :(得分:4)

安装说明from their github readme表示在macos上您需要以下内容:

brew install ta-lib