Backtrader官方中文文档:第二部分Installation安装

本文档参考backtrader官方文档,是官方文档的完整中文翻译,可作为backtrader中文教程、backtrader中文参考手册、backtrader中文开发手册、backtrader入门资料使用。

Backtrader安装

安装须知

Backtrader是自包含的,没有外部依赖(除非你想使用绘图相关功能)。

只需要本地安装有任一版本的python:

  • Python 2.7(对应pip)
  • Python 3.2 / 3.3/ 3.4 / 3.5(对应pip)
  • Matplotlib >= 1.4.1(如果需要绘图则需要安装)

笔者建议不使用过高版本的python,Matplotlib版本过高,存在不兼容。推荐最高使用python3.8。

通过pip安装

pip install backtrader
# 或者 pip install backtrader[plotting]

源码安装(译者不推荐)

clone或下载代码到本地后,将backtrader文件夹下的backtrader
目录拷贝到自己的项目工程,记住绘图徐要matplotlib。不推荐是原因是,小白会遇到各种奇怪的环境问题。

猜你喜欢

转载自blog.csdn.net/windanchaos/article/details/130945698