Statsmodels: pip3 install fails on python3.8

Created on 28 Oct 2019  路  4Comments  路  Source: statsmodels/statsmodels

Describe the bug

a pip3 install fails on python3.8 because the API for cython changed

[A clear and concise description of what the bug is. This should explain why the current behaviour is a problem and why the expected output is a better solution.]

pip3 cannot install the package on python3.8 because the included .c files from cython were
for previous versions of 3.8

the setup.py file should make it easy to regenerate the .c files from cython. Alternatively if the .c
files by cython are backward compatible they should be regenerated.

Code Sample, a copy-pastable example if possible

# Your code here that produces the bug
# This example should be self-contained, and so not rely on external data.
# It should run in a fresh ipython session, and so include all relevant imports.

Note: As you can see, there are many issues on our GitHub tracker, so it is very possible that your issue has been posted before. Please check first before submitting so that we do not have to handle and close duplicates.

Note: Please be sure you are using the latest released version of statsmodels, or a recent build of master. If your problem has been fixed in an unreleased version, you might be able to use master until a new release occurs.

Note: If you are using a released version, have you verified that the bug exists in the master branch of this repository? It helps the limited resources if we know problems exist in the current master so that they do not need to check whether the code sample produces a bug in the next release.

If the issue has not been resolved, please file it in the issue tracker.

Expected Output

A clear and concise description of what you expected to happen.

Output of import statsmodels.api as sm; sm.show_versions()

[paste the output of import statsmodels.api as sm; sm.show_versions() here below this line]

build

Most helpful comment

Workaround is

pip install git+git://github.com/statsmodels/[email protected]

requires Cython.

All 4 comments

They need to be regenerated using Cython. Will probably not update statsmodels 10 and will be fixed in 11.

Workaround is

pip install git+git://github.com/statsmodels/[email protected]

requires Cython.

I had the same problem with Python 3.8 and statsmodels 0.10.1. A workaround that worked for me: Install cython first. If cython is available, all bindings will be recompiled automatically.

pip install cython
pip install statsmodels

Thanks. Closing as answered. We have 3.8 on travis now.

Was this page helpful?
0 / 5 - 0 ratings