7.25K 浏览
0

能正确安装talib了,但是调用是报错了,是不是numpy版本不对? tqsdk已经自带了numpy,是不是版本不对?

C:\Users\Administrator>pip install ta-lib
Requirement already satisfied: ta-lib in c:\program files\python38\lib\site-packages (0.4.20)

C:\Users\Administrator>pip install numpy
Requirement already satisfied: numpy in c:\program files\python38\lib\site-packages (1.19.4)

C:\Users\Administrator>python
Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:37:50) [MSC v.1916 64 bit (AMD64)] on win32
Type “help”, “copyright”, “credits” or “license” for more information.
>>> import talib
Traceback (most recent call last):
File “<stdin>”, line 1, in <module>
File “C:\Program Files\Python38\lib\site-packages\talib\__init__.py”, line 52, in <module>
from ._ta_lib import (
File “talib\_ta_lib.pyx”, line 1, in init talib._ta_lib
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject

yangbin2590 发表新评论 2021年6月15日

希望tqsdk新增LINEARREG_SLOPE和FORECAST方法,谢谢

0

天勤需要的安装包应该是都自带会安装的,可以卸载天勤,重新安装天勤试试

李思恒 已回答的问题 2021年6月15日
您正在查看3个答案中的1个,单击此处查看所有答案。