0

我正在使用 python 2.7 并安装了 anaconda 安装。

虽然我是新手用户,但一切正常。

然后我决定使用ggplot。(python的yhat包)

说明说 pip install -U ggplot

我遇到了问题,它开始安装包括 ggplot 在内的许多软件包,但随后在 statsmodels 软件包期间停止,并显示以下消息:

c:\Python27\Scripts>pip install -U ggplot
Collecting ggplot
  Using cached ggplot-0.6.8.tar.gz
Requirement already up-to-date: six in c:\python27\lib\site-packages (from ggplot)
Collecting statsmodels (from ggplot)
  Using cached statsmodels-0.6.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "c:\users\appdata\local\temp\pip-build-8ce3lv\statsmodels\setup.py", line 393, in <module>
        install_requires) = check_dependency_versions(min_versions)
      File "c:\users\appdata\local\temp\pip-build-8ce3lv\statsmodels\setup.py", line 119, in check_dependency_versions
        if not (StrictVersion(strip_rc(npversion)) >= min_versions['numpy']):
      File "C:\Python27\lib\distutils\version.py", line 40, in __init__
        self.parse(vstring)
      File "C:\Python27\lib\distutils\version.py", line 107, in parse
        raise ValueError, "invalid version number '%s'" % vstring
    ValueError: invalid version number '1.10.0.post2'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in c:\users\appdata\local\temp\pip-build-8ce3lv\statsmodels

我在 SO 和 gitHub 上阅读了很多问题,但除了版本控制问题外,没有什么是清楚的

我尝试升级软件包,但失败了。

任何帮助表示赞赏。

4

2 回答 2

2

使用conda install statsmodels. 在 Windows 10 64bit 上为我工作

于 2017-01-30T06:19:42.420 回答
1

post根据关于 numpy 邮件列表和 numpy 问题跟踪器的讨论,numpy 1.10 很快就会在没有版本号的情况下可用。

statsmodels 的版本扫描无法处理该post部分,因为它过去从未被任何科学或数据分析相关的软件包使用过。

目前唯一的解决办法是编辑statsmodels的setup.py,或者切换到没有post版本号的numpy版本,或者编辑numpy中的版本号。

https://github.com/statsmodels/statsmodels/issues/2645 https://github.com/numpy/numpy/issues/6431

于 2015-10-09T18:43:38.197 回答