Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

bug: statsmodels-0.9.0 and scipy 1.3.0 breakage #9

Closed
sjsrey opened this issue Jun 15, 2019 · 4 comments
Closed

bug: statsmodels-0.9.0 and scipy 1.3.0 breakage #9

sjsrey opened this issue Jun 15, 2019 · 4 comments

Comments

@sjsrey
Copy link
Member

sjsrey commented Jun 15, 2019

PySAL meta is now testing on scipy 1.3.0 and we are hitting a failure in spvcm:

File "/home/travis/build/pysal/pysal/pysal/model/spvcm/diagnostics.py", line 379, in _spectrum0_ar
    raise ImportError('Statsmodels is required to use the AR(0) '

It appears this is due to scipy 1.3.0 removing some links in scipy.misc.

In spvcm, I can reproduce the failure if using scipy 1.3.0:

 File "/home/serge/Dropbox/p/pysal/src/subpackages/spvcm/spvcm/diagnostics.py", line 379, in _spect$
um0_ar                                                                                               
    raise ImportError('Statsmodels is required to use the AR(0) '                                    
ImportError: Statsmodels is required to use the AR(0)  spectral density estimate of the variance.

And, it looks like the upstream issue is with statsmodels:

In [1]: from statsmodels.api import tsa
---------------------------------------------------------------------------                         
ImportError                               Traceback (most recent call last)                         
<ipython-input-1-2ce0b5975ffc> in <module>
----> 1 from statsmodels.api import tsa

~/anaconda3/envs/pysal/lib/python3.7/site-packages/statsmodels/api.py in <module>                   
     14 from . import robust
     15 from .robust.robust_linear_model import RLM                                                 
---> 16 from .discrete.discrete_model import (Poisson, Logit, Probit,                               
     17                                       MNLogit, NegativeBinomial,                            
     18                                       GeneralizedPoisson,                                   

~/anaconda3/envs/pysal/lib/python3.7/site-packages/statsmodels/discrete/discrete_model.py in <module>
     43
     44 from statsmodels.base.l1_slsqp import fit_l1_slsqp                                          
---> 45 from statsmodels.distributions import genpoisson_p                                          
     46
     47 try:

~/anaconda3/envs/pysal/lib/python3.7/site-packages/statsmodels/distributions/__init__.py in <module>
      1 from .empirical_distribution import ECDF, monotone_fn_inverter, StepFunction                
----> 2 from .edgeworth import ExpandedNormal
      3 from .discrete import genpoisson_p, zipoisson, zigenpoisson, zinegbin                       

~/anaconda3/envs/pysal/lib/python3.7/site-packages/statsmodels/distributions/edgeworth.py in <module>
      5 import numpy as np
      6 from numpy.polynomial.hermite_e import HermiteE                                             
----> 7 from scipy.misc import factorial
      8 from scipy.stats import rv_continuous
      9 import scipy.special as special

ImportError: cannot import name 'factorial' from 'scipy.misc' (/home/serge/anaconda3/envs/pysal/lib/python3.7/site-packages/scipy/misc/__init__.py)


@jGaboardi
Copy link
Member

related to #8

@sjsrey
Copy link
Member Author

sjsrey commented Jun 16, 2019

For the meta-package, I could inject a few @ut.skip around these tests as part of the convert-build script.

I guess another option would be to do that upstream (here).

Either would work, although the latter would require a new release of spvcm before July.

@ljwolf
Copy link
Member

ljwolf commented Jun 17, 2019

This looks like a statsmodels bug? I'll track this upstream and see what we can do.

@jGaboardi
Copy link
Member

Closing per #18

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants