如何使用 pip 在 Google Colab 实例上安装 TA-Lib 包?

1 ta-lib google-colaboratory

pip install talib

Collecting talib
  Using cached https://files.pythonhosted.org/packages/1a/80/3492aa3065d7d81a6c51db78920108f84fbe19c4e2740f6bbb83d42f77a4/talib-0.1.1.tar.gz
Building wheels for collected packages: talib
  Building wheel for talib (setup.py) ... error
  ERROR: Failed building wheel for talib
  Running setup.py clean for talib
Failed to build talib
Installing collected packages: talib
    Running setup.py install for talib ... error
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-kj3hzgy2/talib/setup.py'"'"'; __file__='"'"'/tmp/pip-install-kj3hzgy2/talib/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-record-utpwvbtw/install-record.txt --single-version-externally-managed --compile Check the logs for full command output
Run Code Online (Sandbox Code Playgroud)

Mar*_*hal 5

对我来说这是有效的:

!pip install talib-binary
Run Code Online (Sandbox Code Playgroud)

都在 Colab 和 Kaggle 上。