错误:命令“clang”在 pip install TA-Lib 上失败,退出状态为 1

Fil*_*ano 2 python macos

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

须藤 pip 安装 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/
Run Code Online (Sandbox Code Playgroud)

我怎样才能解决这个问题?

Ant*_*ile 5

他们的 github 自述文件中的安装说明表明,在 macos 上您需要以下内容:

brew install ta-lib
Run Code Online (Sandbox Code Playgroud)