ImportError: cannot import name 'STL' from 'statsmodels.tsa.seasonal'

梦想与她 提交于 2020-01-02 10:19:55

问题


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.


回答1:


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).

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

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

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



来源:https://stackoverflow.com/questions/58928785/importerror-cannot-import-name-stl-from-statsmodels-tsa-seasonal

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!