I am trying to import

from statsmodels.stats.outliers_influence import variance_inflation_factor

This is working fine upto Scipy 0.19.

But , with Python 3.6.3 ,it's failing due to unavailability of ss module in Scipy 1.0.0.

~\Anaconda3\lib\site-packages\statsmodels\regression\linear_model.py in <module>()
     41 from scipy.linalg import toeplitz
     42 from scipy import stats
---> 43 from scipy.stats.stats import ss
     44 from scipy import optimize
     45 from scipy.stats import chi2

ImportError: cannot import name 'ss'

Can anyone please guide me how to do VIF analysis using Scipy1.0.0 ?

  • $\begingroup$ It wasn't throwing any error when i executed the same. I'm using python 3.6.4 h6538335_1 defaults, using the latest anaconda. $\endgroup$
    – Toros91
    Commented Feb 20, 2018 at 4:13
  • $\begingroup$ Duplicate on Stack Exchange: stackoverflow.com/questions/48877227/… $\endgroup$
    – kingledion
    Commented Mar 3, 2018 at 21:08

1 Answer 1


First, ss module is in scipy.stats not scipy.stats.stats as of scipy 0.17. Also, it is deprecated, but you seem to have figured that out.

Second, in the current linear_model.py on github, the ss package is no longer imported:

from scipy.linalg import toeplitz
from scipy import stats
from scipy import optimize

What version is your statsmodels? Sounds like you may need to update it.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.