ImportError: cannot import name ExponentialSmoothing

前端 未结 5 800
灰色年华
灰色年华 2021-01-22 01:51

I tried to install statsmodels in python. After installation, I checked with pip freeze. The package can be seen in the list.

When I am trying:

from stat         


        
相关标签:
5条回答
  • 2021-01-22 02:13

    As of today (10 May 2018), the problem is solved by simply installing version 0.9.0 rather than the default 0.8.0:

    pip install statsmodels==0.9.0rc1
    
    0 讨论(0)
  • 2021-01-22 02:18

    You can follow the steps mentioned below:

    Step 1: Remove statsmodel using pip uninstall statsmodel

    Step 2: Install git from here: https://git-scm.com/downloads

    Step 3: Follow steps mentioned under "Installing library(statsmodels)" from link mentioned below: https://www.analyticsvidhya.com/blog/2018/02/time-series-forecasting-methods/?utm_source=feedburner&utm_medium=email&utm_campaign=Feed%3A+AnalyticsVidhya+%28Analytics+Vidhya%29

    0 讨论(0)
  • 2021-01-22 02:22

    If using conda, this will make statsmodel 0.9.0

    conda update statsmodels
    
    0 讨论(0)
  • 2021-01-22 02:27

    I met the same situation, and the install process recommended in Nish's url didn't work for me. Here's how did I solve the problem (I'm using Mac OS).

    Remove statsmodels library first, if you have installed: pip uninstall statsmodels

    1. In your terminal, type git init, to initiate git
    2. Then type git clone git://github.com/statsmodels/statsmodels.git
    3. Change the directory to statsmodels using “cd statsmodels”
    4. Next type python setup.py install
    5. python setup.py build_ext --inplace
    6. Now type python in your terminal and then type from statsmodels.tsa.api import ExponentialSmoothing, to see whether it can import successfully
    0 讨论(0)
  • 2021-01-22 02:27

    It is the wrong import,

    Try

    from statsmodels.tsa.holtwinters import ExponentialSmoothing, SimpleExpSmoothing, Holt

    0 讨论(0)
提交回复
热议问题