python - 错误: command 'clang' failed with exit status 1 on pip install TA-Lib

标签 python macos

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

sudo 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/

我该如何解决这个问题?

最佳答案

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

brew install ta-lib

关于python - 错误: command 'clang' failed with exit status 1 on pip install TA-Lib,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45246916/

相关文章:

python - 如何在 matplotlib 中的等高线图上绘制矢量场?

c - Atoi(char *p) 函数

c++ - 即使当前正在运行全屏应用程序,如何显示通知?

java - Apache Thrift 中的对称加密 (AES)

python - 将文件复制到Kubernetes Pod

macos - OS X Lion 中具有自动保存和版本功能的 Shoebox/Library 应用程序

mysql - 无法创建/写入文件 'xxxx.txt'(错误代码 : 13 - Permission denied)

python - 无法在 macOS Catalina 上安装 psycopg2

python - 如何通过pygit2获取当前 checkout 的Git分支名称?

python - 如何从文件中获取列表列表以更改为字典