OLS 导入在 Pandas 中损坏; easy_install 找到正确的包但由于某种原因失败
OLS import broken in Pandas; easy_install finds the right package but fails for some reason
这可能是来自 pandas ols import broken?
的后续问题
我在 Python 2.7 上,遇到了完全相同的问题,但没有像 Peter 那样成功解决问题。
主要问题是statsmodels的稳定版本是0.6.1。 (根据 http://statsmodels.sourceforge.net/)。 Pandas使用了statsmodels.api中的OLS函数,该函数仅在开发版本0.7.0中可用。我很难相信在 2(或更多,如果我的某些搜索结果值得相信!)年后 pandas 仍然是坏的?
@TomAugspurger 建议 !pip install statsmodels
(我在 ipython 内这样做)。我得到:
Requirement already satisfied (use --upgrade to upgrade): statsmodels in c:\users\swang\appdata\local\enthought\canopy\user\lib\site-packages
Cleaning up...
所以!pip install --upgrade statsmodels
然后得到我
Cannot fetch index base URL https://pypi.python.org/simple/ Could not
find any downloads that satisfy the requirement statsmodels in
c:\users\swang\appdata\local\enthought\canopy\user\lib\site-packages
Downloading/unpacking statsmodels Cleaning up... No distributions at
all found for statsmodels in
c:\users\swang\appdata\local\enthought\canopy\user\lib\site-packages
Storing debug log for failure in C:\Users\swang\pip\pip.log
尽管统计模型在 https://pypi.python.org/simple/ 中清晰可见。
!easy_install -U statsmodels
给出了最有希望的结果:
Searching for statsmodels Reading
http://pypi.python.org/simple/statsmodels/ Reading
http://pypi.python.org/simple/statsmodels/ Couldn't retrieve index
page for 'statsmodels' Scanning index of all packages (this may take a
while) Reading http://pypi.python.org/simple/ Best match: statsmodels
0.7.0 Adding statsmodels 0.7.0 to easy-install.pth file
Using
c:\users\swang\appdata\local\enthought\canopy\user\lib\site-packages
Processing dependencies for statsmodels Finished processing
dependencies for statsmodels Download error on
http://pypi.python.org/simple/statsmodels/: [Errno 1] _ssl.c:507:
error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol --
Some packages may not be found! Download error on
http://pypi.python.org/simple/statsmodels/: [Errno 1] _ssl.c:507:
error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol --
Some packages may not be found! Download error on
http://pypi.python.org/simple/: [Errno 1] _ssl.c:507:
error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol --
Some packages may not be found!
是的!!! 0.7.0!给我那个!为什么服务器不打招呼?
我也试过 !easy_install -U scikits.statsmodels
和许多其他变体,但没有成功。
Bottomline/TL;DR - 我需要将我的 statsmodels 升级到 0.7.0 并且 pip install --upgrade
和 easy_install -U
不会让我.我认为 easy_install -U 让我最接近目标但在那里失败了,我无法弄清楚为什么。我认为我的技术能力不足以从 https://github.com/statsmodels/statsmodels/ 编译原始代码。您能否建议新手解决这个简单问题的最佳方法?
0.7.0 没有可用的版本;这就是为什么您不能从 pip
.
安装它的原因
您可以访问 PyPi page for the module 以了解所有已发布的版本。
解决问题,可以安装开发主干。值得庆幸的是,该小组发布了 windows binaries,您可以找到与您的 Python.
版本兼容的版本
这可能是来自 pandas ols import broken?
的后续问题我在 Python 2.7 上,遇到了完全相同的问题,但没有像 Peter 那样成功解决问题。
主要问题是statsmodels的稳定版本是0.6.1。 (根据 http://statsmodels.sourceforge.net/)。 Pandas使用了statsmodels.api中的OLS函数,该函数仅在开发版本0.7.0中可用。我很难相信在 2(或更多,如果我的某些搜索结果值得相信!)年后 pandas 仍然是坏的?
@TomAugspurger 建议 !pip install statsmodels
(我在 ipython 内这样做)。我得到:
Requirement already satisfied (use --upgrade to upgrade): statsmodels in c:\users\swang\appdata\local\enthought\canopy\user\lib\site-packages
Cleaning up...
所以!pip install --upgrade statsmodels
然后得到我
Cannot fetch index base URL https://pypi.python.org/simple/ Could not find any downloads that satisfy the requirement statsmodels in c:\users\swang\appdata\local\enthought\canopy\user\lib\site-packages Downloading/unpacking statsmodels Cleaning up... No distributions at all found for statsmodels in c:\users\swang\appdata\local\enthought\canopy\user\lib\site-packages Storing debug log for failure in C:\Users\swang\pip\pip.log
尽管统计模型在 https://pypi.python.org/simple/ 中清晰可见。
!easy_install -U statsmodels
给出了最有希望的结果:
Searching for statsmodels Reading http://pypi.python.org/simple/statsmodels/ Reading http://pypi.python.org/simple/statsmodels/ Couldn't retrieve index page for 'statsmodels' Scanning index of all packages (this may take a while) Reading http://pypi.python.org/simple/ Best match: statsmodels 0.7.0 Adding statsmodels 0.7.0 to easy-install.pth file
Using c:\users\swang\appdata\local\enthought\canopy\user\lib\site-packages Processing dependencies for statsmodels Finished processing dependencies for statsmodels Download error on http://pypi.python.org/simple/statsmodels/: [Errno 1] _ssl.c:507: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol -- Some packages may not be found! Download error on http://pypi.python.org/simple/statsmodels/: [Errno 1] _ssl.c:507: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol -- Some packages may not be found! Download error on http://pypi.python.org/simple/: [Errno 1] _ssl.c:507: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol -- Some packages may not be found!
是的!!! 0.7.0!给我那个!为什么服务器不打招呼?
我也试过 !easy_install -U scikits.statsmodels
和许多其他变体,但没有成功。
Bottomline/TL;DR - 我需要将我的 statsmodels 升级到 0.7.0 并且 pip install --upgrade
和 easy_install -U
不会让我.我认为 easy_install -U 让我最接近目标但在那里失败了,我无法弄清楚为什么。我认为我的技术能力不足以从 https://github.com/statsmodels/statsmodels/ 编译原始代码。您能否建议新手解决这个简单问题的最佳方法?
0.7.0 没有可用的版本;这就是为什么您不能从 pip
.
您可以访问 PyPi page for the module 以了解所有已发布的版本。
解决问题,可以安装开发主干。值得庆幸的是,该小组发布了 windows binaries,您可以找到与您的 Python.
版本兼容的版本