【问题标题】:Cannot import MSTL from statsmodels无法从 statsmodels 导入 MSTL
【发布时间】:2022-05-27 16:46:46
【问题描述】:

我目前正在尝试从 MSTL 模块 (https://www.statsmodels.org/devel/generated/statsmodels.tsa.seasonal.MSTL.html) 的 statsmodels.tsa.seasonal 导入 MSTL,但它返回 ImportError。我在 MAC M1 2020 上安装了 conda 的 statsmodels

标签: 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 虚拟环境。

【讨论】:

    猜你喜欢
    • 2021-11-02
    • 1970-01-01
    • 2018-11-10
    • 1970-01-01
    • 2018-10-27
    • 2016-11-27
    • 1970-01-01
    • 1970-01-01
    • 2016-12-12
    相关资源
    最近更新 更多