Open qhzhang87 opened 7 years ago
I had the same error. Upgrading statsmodels solved the issue:
pip install statsmodels --upgrade
I also encountered the same issue. I did the upgrade as suggested above. However, I still have the same error. I am using Jupyter notebook with Python 2.0 on a mac. Any suggestion? Thanks in advance.
I'm having the same problem on Jupyter Notebooks, any advice? I'm running Python 2.7 with statsmodels 0.8.0
For whatever reason, this error is only occurring in my Jupyter notebook. Upgraded to the most recent version of statsmodels
on Python 2.7. The command:
from statsmodels.tsa.arima_model import ARIMA
@qhzhang87 's error in Jupyter, but successfully imports with errors in a .py
script or within the Python terminal:
Python 2.7.13 |Anaconda custom (x86_64)| (default, Dec 20 2016, 23:05:08)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> from statsmodels.tsa.arima_model import ARIMA
//anaconda/envs/py27/lib/python2.7/site-packages/pandas/core/computation/__init__.py:18: UserWarning: The installed version of numexpr 2.4.4 is not supported in pandas and will be not be used
The minimum supported version is 2.4.6
ver=ver, min_ver=_MIN_NUMEXPR_VERSION), UserWarning)
//anaconda/envs/py27/lib/python2.7/site-packages/statsmodels/compat/pandas.py:56: FutureWarning: The pandas.core.datetools module is deprecated and will be removed in a future version. Please use the pandas.tseries module instead.
from pandas.core import datetools
>>>
EDIT: solved by restarting kernel :)
Piling on here :)
Ran pip install statsmodels --upgrade
; then, from statsmodels.stats.outliers_influence import variance_inflation_factor
in both command line and jupyter notebook... runs in python, but not in jupyter notebook...
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-109-d8fbd8280798> in <module>()
----> 1 from statsmodels.stats.outliers_influence import variance_inflation_factor
/anaconda2/lib/python2.7/site-packages/statsmodels/stats/outliers_influence.py in <module>()
11 import numpy as np
12
---> 13 from statsmodels.regression.linear_model import OLS
14 from statsmodels.tools.decorators import cache_readonly
15 from statsmodels.stats.multitest import multipletests
/anaconda2/lib/python2.7/site-packages/statsmodels/regression/__init__.py in <module>()
----> 1 from .linear_model import yule_walker
2
3 from statsmodels import PytestTester
4 test = PytestTester()
5
/anaconda2/lib/python2.7/site-packages/statsmodels/regression/linear_model.py in <module>()
46 cache_readonly,
47 cache_writable)
---> 48 import statsmodels.base.model as base
49 import statsmodels.base.wrapper as wrap
50 from statsmodels.emplike.elregress import _ELRegOpts
/anaconda2/lib/python2.7/site-packages/statsmodels/base/model.py in <module>()
6 from statsmodels.tools.data import _is_using_pandas
7 from statsmodels.tools.tools import recipr, nan_dot
----> 8 from statsmodels.stats.contrast import (ContrastResults, WaldTestResults,
9 t_test_pairwise)
10 from statsmodels.tools.decorators import resettable_cache, cache_readonly
ImportError: cannot import name t_test_pairwise
from statsmodels.stats.outliers_influence import variance_inflation_factor
Thank you so much! solved
I cannot import the package, have the following error message: