【发布时间】:2019-06-12 15:17:39
【问题描述】:
我这辈子都不知道如何为 Python 3 安装包 statsmodels。感觉就像我已经尝试了所有方法,但没有任何效果。
目标:在python中导入statsmodels
我开始:
pip install statsmodels
主要错误信息:
Failed bulding wheel for statsmodels.
Cython is required to compile statsmodels from a development branch.
Please install Cython or download a source release of statsmodels.
所以我试试:
pip install cython
给予:
Requirement already satisfied: cython in c:users\XXX\appdata\roaming\python\python36\site-packages
我通过安装 anaconda 来安装 cython。我已经尝试了几乎所有可以通过基本谷歌搜索找到的答案。但事情似乎并不奏效。
我现在只显示第一步,而不是列出我尝试过的输入\输出,但如果您想查看任何命令的输出,请告诉我。
我该如何从这里继续?感谢您提供任何帮助,我已经尝试解决这个问题好几天了,我只是感到沮丧。
现在我正在尝试:
easy_install cython
这似乎有效,但后来 pip install statsmodels 没有用。
Command ... failed with error code 1.
我试过了:
git clone https://github.com/statsmodels/statsmodels
cd statsmodels
pip install .
并因一堆错误而失败。
【问题讨论】:
-
您使用的是类 Unix 操作系统还是 Windows?如果不是 Windows,您可以尝试
pip install statsmodels --only-binary=statsmodels强制 pip 从包索引安装轮子。否则,请发布您尝试从源代码安装时遇到的错误? -
感谢您的回答。我在 Windows 上。当我尝试您的建议时,它给了我:找不到满足statsmodels要求的版本(来自版本:)找不到statsmodels的匹配分布
标签: python cython statsmodels