问题描述
我目前正在尝试将 Conda 中的 statsmodels 包更新为开发者版本 statsmodels v0.11.0dev0.
I am currently trying to update my statsmodels package in Conda to the developer version statsmodels v0.11.0dev0.
由于我对 Python 比较陌生,所以我很难理解有关如何更新到开发人员版本的不同线程.
As I am relatively new to Python, I am struggling heavily to understand different threads on how to update to the developer version.
在 https://www.statsmodels.org/dev/install.html 给出了关于如何安装开发者版本的简短提示,但我无法遵循.
On https://www.statsmodels.org/dev/install.html a short hint on how to install the developer version is given, nevertheless I cannot follow.
我尝试了 pip install -e 和 python setup.py develop.
I have tried the pip install -e and python setup.py develop.
为了具体更新statsmodel包,我需要在前面放什么?一个循序渐进的例子会非常有帮助并受到高度赞赏.
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.
推荐答案
正常安装
(此处不适用于回答问题)
(not applicable here to answer the question)
https://www.statsmodels.org/dev/install.html中的文档 明确指出了两种安装 statsmodels 的方法:
The documenation in https://www.statsmodels.org/dev/install.html clearly indicates two ways for installing statsmodels:
对于第一个选项,您需要安装 Anaconda 才能运行 condainstall -c conda-forge statsmodels
.
For the first option you need to install Anaconda to be able to run conda install -c conda-forge statsmodels
.
另一方面,需要 git.然后克隆github存储库,以便能够运行pip install git+https://github.com/statsmodels/statsmodels
然后python setup.py install
.
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
.
开发者版本
运行以下步骤:
1) git 克隆 git://github.com/statsmodels/statsmodels.git
2)pip安装cython
3) pip install -r requirements.txt
4) python setup.py 开发
1) git clone git://github.com/statsmodels/statsmodels.git
2) pip install cython
3) pip install -r requirements.txt
4) python setup.py develop
然后导致正确编译 c 文件:
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.
我已经在 Mac 上对此进行了测试,并且还通过 Xcode 安装了 gcc,不确定这是否在这里起作用.
I have tested this on Mac and have gcc installed via Xcode as well, not sure if this plays a role here.
这篇关于如何使用 Conda 更新到 statsmodels 的开发者版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!