PyFolio - Zipline - Pandas 版本不一致

问题描述

我第一次发帖。我已安装并运行 zipline 1.4.1,但随后我尝试使用 PyFolio 安装 pip install pyfolio

PyFolio 安装成功,但它最终卸载了我的 pandas 0.22 版本并安装了 pandas 1.1.5。这是我得到的:

Attempting uninstall: pandas
Found existing installation: pandas 0.22.0
Uninstalling pandas-0.22.0:
  Successfully uninstalled pandas-0.22.0
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behavIoUr is the source of the following dependency conflicts.
zipline 1.4.1 requires pandas<=0.22,>=0.18.1,but you have pandas 1.1.5 which is incompatible.
Successfully installed joblib-1.0.1 pandas-1.1.5 pyfolio-0.9.2 scikit-learn-0.24.2 seaborn-0.11.1 threadpoolctl-2.1.0

在此程序之后,由于熊猫版本不匹配,我的滑索显然停止工作。

我尝试使用 pip install pandas==0.18.1 手动安装所需的 Pandas 版本,但只给出了很长的错误消息。

我对接下来要做什么一无所知。任何建议将不胜感激。

解决方法

这已经解决了。我正在使用导致依赖问题的 conda。我还发现(在发布上述问题后)zipline 已停止使用(由于 Quantopian 折叠)并已被 zipline-trader 取代。 Zipline Trader 可以通过 pip 安装,自动解决所有依赖问题。