Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
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 statsmodels.tsa.api import ExponentialSmoothing, SimpleExpSmoothing, Holt
I am getting error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name ExponentialSmoothing
I have tried the following link also :
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
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
In your terminal, type git init
, to initiate git
Then type git clone git://github.com/statsmodels/statsmodels.git
Change the directory to statsmodels using “cd statsmodels”
Next type python setup.py install
python setup.py build_ext --inplace
Now type python
in your terminal and then type from statsmodels.tsa.api import ExponentialSmoothing
, to see whether it can import successfully
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
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.