【问题标题】:Cannot import MSTL from statsmodels无法从 statsmodels 导入 MSTL
【发布时间】:2022-05-27 16:46:46
【问题描述】:
标签:
machine-learning
deep-learning
statistics
time-series
statsmodels
【解决方案1】:
我只是遇到了同样的问题并做了一些研究。
似乎 MSTL 仅在最新版本的 statsmodels 上可用:版本 0.14.0
如果您使用 conda install -c conda-forge statsmodels 安装 statsmodels,
您将获得 statsmodels 0.13.2 版本。
(使用脚本编辑器,尝试通过 C:\Users{username}\Anaconda3\Lib\site-packages\statsmodels 或机器上安装 statsmodels 的任何位置搜索“MSTL”,您可能找不到它)
您需要从 statsmodels 的 github 存储库中的最新源安装最新版本:
www.statsmodels.org/dev/install.html
从 anaconda 提示符:
git clone https://github.com/statsmodels/statsmodels.git
pip install git+https://github.com/statsmodels/statsmodels
您将需要安装 C 编译器和 git
对于 git,您可以使用:conda install -c anaconda git
请小心,因为最新版本的安装可能会干扰您安装的其他 python 包。
我建议您为此使用 conda 虚拟环境。