最近,我试图完成一个神经网络和技术分析程序,用于通过已使用的数据库预测金融股票市场中的波动;我目前正在使用模块Quandl进行金融信息检索,而程序本身仍在Google Colaboratory集成开发环境中。出于本项目的目的,我最近尝试为模块TA-Lib安装一个Python包装器,其中包含用于分析烛台图模式的部分;该库和页面的文档如下所示:
https://github.com/mrjbq7/ta-lib
https://mrjbq7.github.io/ta-lib/func_groups/pattern_recognition.html
在Colaboratory编辑器中,我尝试通过以下命令安装该程序:
pip install TA-Lib但是,集成开发环境提供了以下错误消息:
Collecting TA-Lib
Using cached https://files.pythonhosted.org/packages/90/05/d4c6a778d7a7de0be366bc4a850b4ffaeac2abad927f95fa8ba6f355a082/TA-Lib-0.4.17.tar.gz
Requirement already satisfied: numpy in /usr/local/lib/python3.6/dist-packages (from TA-Lib) (1.17.5)
Building wheels for collected packages: TA-Lib
Building wheel for TA-Lib (setup.py) ... error
ERROR: Failed building wheel for TA-Lib
Running setup.py clean for TA-Lib
Failed to build TA-Lib
Installing collected packages: TA-Lib
Running setup.py install for TA-Lib ... error
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-npc2f3yq/TA-Lib/setup.py'"'"'; __file__='"'"'/tmp/pip-install-npc2f3yq/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-record-oh1la09j/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.有没有替代的方法来避免这个不可避免的错误?如果没有,有没有一种方法可以在Colaboratory中下载此模块,从而绕过这些过程?谢谢你的帮助。
发布于 2020-01-20 17:53:15
尝尝这个
!wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz
!tar -xzvf ta-lib-0.4.0-src.tar.gz
%cd ta-lib
!./configure --prefix=/usr
!make
!make install
!pip install Ta-Lib
import talibhttps://stackoverflow.com/questions/59807374
复制相似问题