How to update to the developer version of statsmodels using Conda?

青春壹個敷衍的年華 提交于 2021-01-03 03:40:28

问题


I am currently trying to update my statsmodels package in Conda to the developer version statsmodels v0.11.0dev0.

As I am relatively new to Python, I am struggling heavily to understand different threads on how to update to the developer version.

On https://www.statsmodels.org/dev/install.html a short hint on how to install the developer version is given, nevertheless I cannot follow.

I have tried the pip install -e and python setup.py develop.

In order to specifically update the statsmodel package, what do I need to put in front? A stepwise example would be really helpful and highly appreciated.


回答1:


Normal install

(not applicable here to answer the question)

The documenation in https://www.statsmodels.org/dev/install.html clearly indicates two ways for installing statsmodels:

For the first option you need to install Anaconda to be able to run conda install -c conda-forge statsmodels.

And for the other way git is required. Then clone the github repository to be able to run pip install git+https://github.com/statsmodels/statsmodels and then python setup.py install.

Developer version

Run the following steps:

1) git clone git://github.com/statsmodels/statsmodels.git
2) pip install cython
3) pip install -r requirements.txt
4) python setup.py develop

which then results in proper compile of c files:

Compiling statsmodels/tsa/statespace/_initialization.pyx because it changed.
Compiling statsmodels/tsa/statespace/_representation.pyx because it changed.
Compiling statsmodels/tsa/statespace/_kalman_filter.pyx because it changed.
Compiling statsmodels/tsa/statespace/_filters/_inversions.pyx because it changed.
Compiling statsmodels/tsa/statespace/_filters/_univariate.pyx because it changed.
Compiling statsmodels/tsa/statespace/_filters/_univariate_diffuse.pyx because it changed.
Compiling statsmodels/tsa/statespace/_kalman_smoother.pyx because it changed.
Compiling statsmodels/tsa/statespace/_smoothers/_alternative.pyx because it changed.
Compiling statsmodels/tsa/statespace/_smoothers/_classical.pyx because it changed.
Compiling statsmodels/tsa/statespace/_smoothers/_conventional.pyx because it changed.
Compiling statsmodels/tsa/statespace/_smoothers/_univariate.pyx because it changed.
Compiling statsmodels/tsa/statespace/_smoothers/_univariate_diffuse.pyx because it changed.
Compiling statsmodels/tsa/statespace/_simulation_smoother.pyx because it changed.
Compiling statsmodels/tsa/statespace/_tools.pyx because it changed.
[ 1/14] Cythonizing statsmodels/tsa/statespace/_filters/_inversions.pyx
[ 2/14] Cythonizing statsmodels/tsa/statespace/_filters/_univariate.pyx
[ 3/14] Cythonizing statsmodels/tsa/statespace/_filters/_univariate_diffuse.pyx
[ 4/14] Cythonizing statsmodels/tsa/statespace/_initialization.pyx
[ 5/14] Cythonizing statsmodels/tsa/statespace/_kalman_filter.pyx
[ 6/14] Cythonizing statsmodels/tsa/statespace/_kalman_smoother.pyx
[ 7/14] Cythonizing statsmodels/tsa/statespace/_representation.pyx
[ 8/14] Cythonizing statsmodels/tsa/statespace/_simulation_smoother.pyx
[ 9/14] Cythonizing statsmodels/tsa/statespace/_smoothers/_alternative.pyx
[10/14] Cythonizing statsmodels/tsa/statespace/_smoothers/_classical.pyx
[11/14] Cythonizing statsmodels/tsa/statespace/_smoothers/_conventional.pyx
[12/14] Cythonizing statsmodels/tsa/statespace/_smoothers/_univariate.pyx
[13/14] Cythonizing statsmodels/tsa/statespace/_smoothers/_univariate_diffuse.pyx
warning: statsmodels/tsa/statespace/_smoothers/_univariate_diffuse.pyx:555:14: Unreachable code
warning: statsmodels/tsa/statespace/_smoothers/_univariate_diffuse.pyx:1130:14: Unreachable code
warning: statsmodels/tsa/statespace/_smoothers/_univariate_diffuse.pyx:1705:14: Unreachable code
warning: statsmodels/tsa/statespace/_smoothers/_univariate_diffuse.pyx:2280:14: Unreachable code
[14/14] Cythonizing statsmodels/tsa/statespace/_tools.pyx
[some compiler warnings are shown here]
5 warnings generated.

I have tested this on Mac and have gcc installed via Xcode as well, not sure if this plays a role here.



来源:https://stackoverflow.com/questions/57868744/how-to-update-to-the-developer-version-of-statsmodels-using-conda

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!