[英]Unable to install Statsmodels…python
I am using 32 bit cmd, 64 bit windows, python 2.7我正在使用 32 位 cmd、64 位 Windows、python 2.7
when I type the command pip install statsmodels当我输入命令 pip install statsmodels
I get the following error for some module of scipy...对于 scipy 的某些模块,我收到以下错误...
Failed building wheel for Scipy Failed cleaning build dir for scipy
install numpy安装 numpy
pip install numpy
If you face installation issues for numpy, get the pre-built windows installers from http://www.lfd.uci.edu/~gohlke/pythonlibs/ for your python version (python version is different from windows version).如果您遇到 numpy 的安装问题,请从http://www.lfd.uci.edu/~gohlke/pythonlibs/获取适用于您的 Python 版本(python 版本与 Windows 版本不同)的预构建 Windows 安装程序。
numpy 32-bit: numpy-1.11.1+mkl-cp27-cp27m-win32.whl numpy 32 位:numpy-1.11.1+mkl-cp27-cp27m-win32.whl
numpy 64-bit: numpy-1.11.1+mkl-cp27-cp27m-win_amd64.whl numpy 64 位:numpy-1.11.1+mkl-cp27-cp27m-win_amd64.whl
Later you require VC++ 9.0, then please get it from below link Microsoft Visual C++ 9.0 is required.稍后您需要 VC++ 9.0,然后请从以下链接获取 Microsoft Visual C++ 9.0 是必需的。 Get it from http://aka.ms/vcpython27
从http://aka.ms/vcpython27获取它
Then install然后安装
Get the pre-built windows installers from http://www.lfd.uci.edu/~gohlke/pythonlibs/ for your python version (python version is different from windows version).从http://www.lfd.uci.edu/~gohlke/pythonlibs/获取适用于您的 Python 版本(python 版本与 Windows 版本不同)的预构建 Windows 安装程序。
Scipy 32-bit: scipy-0.18.0-cp27-cp27m-win32.whl Scipy 32 位:scipy-0.18.0-cp27-cp27m-win32.whl
Scipy 64-bit: scipy-0.18.0-cp27-cp27m-win_amd64.whl Scipy 64 位:scipy-0.18.0-cp27-cp27m-win_amd64.whl
If it fails saying whl is not supported wheel on this platform , then upgrade pip using python -m pip install --upgrade pip
and try installing scipy如果在此平台上显示不支持 whl 失败,请使用
python -m pip install --upgrade pip
--upgrade python -m pip install --upgrade pip
升级python -m pip install --upgrade pip
并尝试安装 scipy
Now try现在试试
pip install scipy
Then try然后试试
pip install statsmodels
It should work like a charm它应该像魅力一样工作
I have tried to write this on cmd.exe and it worked.我试过在 cmd.exe 上写这个,它奏效了。
pip install statsmodels==0.6.0
install statsmodels for python 2.7 in windows在 Windows 中为 python 2.7 安装 statsmodels
An easier way to install python libraries on Windows with C/C++/Fortran/... dependencies is to use conda
.在具有 C/C++/Fortran/... 依赖项的 Windows 上安装 python 库的更简单方法是使用
conda
。 conda
is available in MiniConda or Anaconda continuum products. conda
是可用MiniConda或蟒蛇连续的产品。
Another easy way to install scientific python libraries on windows is to use Christoph Gohlke's windows web page .在 Windows 上安装科学 Python 库的另一种简单方法是使用Christoph Gohlke 的 windows 网页。
If you have no much idea about all of them and how to manage dependencies on windows I recommend you uninstalling your Python and installing anaconda.如果您对所有这些以及如何管理 Windows 上的依赖项都不太了解,我建议您卸载 Python 并安装 anaconda。 Anaconda already has Numpy, Scipy, Matplotlib,..., and statsmodels pre-installed (see the list of the packages included in the anaconda distribution) .
Anaconda 已经预先安装了Numpy、Scipy、Matplotlib 和 statsmodels (请参阅 anaconda 发行版中包含的软件包列表) 。
Make sure you are using the latest version of pip To check which version you are using try:确保您使用的是最新版本的pip要检查您使用的是哪个版本,请尝试:
pip --version
To install statsmodels you can either go to cmd.exe or if you are using python pycharm use "Terminal Window" and type:要安装 statsmodels,您可以转到 cmd.exe,或者如果您使用的是 python pycharm,请使用“终端窗口”并键入:
pip install statsmodels==0.9.0
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.