Cannot import MSTL from statsmodels
Asked Answered
M

1

6

I am currently trying to import MSTL from statsmodels.tsa.seasonal the module of MSTL (https://www.statsmodels.org/devel/generated/statsmodels.tsa.seasonal.MSTL.html) but it returns an ImportError. I have installed statsmodels from conda on MAC M1 2020

Meander answered 26/5, 2022 at 16:27 Comment(1)
You need to use the un-released verion. This requires installing from git hub. Something like pip install git+github.com/statsmodels/statsmodels.gitBracey
C
11

I just had the same issue and did some research. It seems that MSTL is only available on the most recent version of statsmodels: version 0.14.0

If you install statsmodels using conda install -c conda-forge statsmodels, you will get the statsmodels 0.13.2 version.

(Using a script editor, try searching for 'MSTL' through C:\Users{username}\Anaconda3\Lib\site-packages\statsmodels, or wherever statsmodels is installed on your machine, you will probably not find it)

You'll need to install the most recent version from the latest source on statsmodels's github repository: www.statsmodels.org/dev/install.html

From the anaconda prompt:

git clone https://github.com/statsmodels/statsmodels.git
pip install git+https://github.com/statsmodels/statsmodels

You will need a C compiler and git installed For git you can use: conda install -c anaconda git

Be careful as the installation of the newest version may interfere with your other installed python packages. I would recommend that you use a conda virtual environment for this.

Charger answered 27/5, 2022 at 8:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.