You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
running tox on a package that has statsmodels as a dependency raises the numpy error in the OP.
python3 on ubuntu 16 pip3 install goes through OK but on import raises ImportError: cannot import name '_representation' (no such problem on py2) (this occurs both with and without tox)
Hi. Try again now? I am hoping that the wheels will have fixed the install problems.
You will still need to install numpy and scipy and pandas in order for statsmodels to import correctly.
For reference the numpy error is because the numpy package is a build-time dependency of statsmodels. Funnily enough, ImportError: cannot import name '_representation , is because of a hidden build-time dependency on Scipy. That is, if you want to install statsmodels from source, you need scipy installed already, and if you don't, statsmodels builds incorrectly.
Activity
Thomasillo commentedon May 17, 2018
Same for me
jbrockmendel commentedon May 17, 2018
Similar 0.9.0 installation issues:
toxon a package that has statsmodels as a dependency raises the numpy error in the OP.ImportError: cannot import name '_representation'(no such problem on py2) (this occurs both with and withouttox)matthew-brett commentedon May 18, 2018
Hi. Try again now? I am hoping that the wheels will have fixed the install problems.
You will still need to install numpy and scipy and pandas in order for statsmodels to import correctly.
For reference the
numpyerror is because the numpy package is a build-time dependency of statsmodels. Funnily enough,ImportError: cannot import name '_representation, is because of a hidden build-time dependency on Scipy. That is, if you want to install statsmodels from source, you need scipy installed already, and if you don't, statsmodels builds incorrectly.zertrin commentedon May 21, 2018
Note: On Linux, this works for Python 3.5 and 3.6 but not for 3.4 because there is no Linux
cp34wheel for statsmodels 0.9.0 (version 0.8.0 had Linux wheels for py34).Consequently, cannot use requirements.txt with statsmodels for py34 as of version 0.9.0.
A workaround for requirements.txt is to pin the statsmodels version for py3.4 to something before 0.9.0:
matthew-brett commentedon May 21, 2018
Yes, I'm sorry about that. Python 3.4 wheels are harder to test because Pandas requires Python3 >= 3.5 : https://github.com/pandas-dev/pandas/blob/0.23.x/setup.py#L751
zertrin commentedon May 21, 2018
As a matter of fact, this is part of my requirements_dev.txt now 😉
TST: Adjust appveyor tolerance
TST: Adjust appveyor tolerance
TST: Adjust appveyor tolerance
TST: Adjust appveyor tolerance