本文介绍了ImportError:无法从"statsmodels.tsa.seasonal"导入名称"STL"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在遇到这个问题,我无法从statsmodels导入STL.我曾尝试卸载statsmodels,因为建议在类似问题的某个地方进行,但是这是不可能的,至少是我这样做的方式:!pip卸载statsmodels-不起作用.

I have this issue now, I cannot import STL from statsmodels. I've tried to uninstall statsmodels as it was recommended somewhere with a similar issue but it is not possible, at least the way I do it:!pip uninstall statsmodels - NOT working.

推荐答案

似乎statsmodels的STL函数未包含在该库的最新稳定版本(0.10.2)中,但已包含在开发版本(0.11)中. 0dev0).

It seems that the STL function from statsmodels is not included in the latest stable version of the library (0.10.2) but is in the dev version (0.11.0dev0).

您可以使用以下命令构建并安装此特定版本:pip install git+https://github.com/statsmodels/statsmodels.git

You can build and install this specific version with this command: pip install git+https://github.com/statsmodels/statsmodels.git

为此,如果您还没有交流编译器,则可能需要它,此处介绍了所有内容: https://www.statsmodels.org/dev/install.html#installation-from-source

For this you may need a c compiler if you don't already have one, everything is explained here: https://www.statsmodels.org/dev/install.html#installation-from-source

我还发现了该软件包,该软件包看起来很有希望: https://github.com/jrmontag/STLDecompose

I've also found this package that seems promising: https://github.com/jrmontag/STLDecompose

这篇关于ImportError:无法从"statsmodels.tsa.seasonal"导入名称"STL"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 21:13