完整报错信息如下:In [1]: import talib as tlImportError Traceback (most recent call last)<ipython-input-1-dc6920eb95e2> in <module> ---> 1 import talib as tl~/anaconda3/envs/quant/lib/python3.7/site-packages/talib/init.py in <module> 50 return wrapper 51 ---> 52 from ._ta_lib...
When importing talib in virtual environment that uses Python 3.11 I get the following error message: In [1]: import talib as ta ImportError Traceback (most recent call last) Cell In [1], line 1 ---> 1 import talib as ta File ~/opt/anaco...
import pandas as pd import talib # 读取数据 df = pd.read_csv('data.csv') # 计算价格 close_prices = df['Close'].values price_levels = np.arange(df['High'].min(), df['High'].max(), 0.1) # 计算收益 target_prices = np.array([df['Close'].iloc[i] for i in range(len(close...