OLS import broken in Pandas; easy_install finds th

2019-09-19 01:19发布

this may be a followup question from pandas ols import broken?

I am on Python 2.7 and have the exact same issue but do not have the same success as Peter in resolving.

The main problem is the stable version of statsmodels is 0.6.1. (per http://statsmodels.sourceforge.net/). Pandas uses the OLS function from statsmodels.api which is only available in the development version 0.7.0. I find it hard to believe that after 2 (or more, if some of my search results are to be believed!) years pandas is still broken?

@TomAugspurger suggested !pip install statsmodels (im doing this within ipython). with that I get:

Requirement already satisfied (use --upgrade to upgrade): statsmodels in c:\users\swang\appdata\local\enthought\canopy\user\lib\site-packages

Cleaning up...

so !pip install --upgrade statsmodels then gets me

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

Despite statsmodels being clearly visible in https://pypi.python.org/simple/.

!easy_install -U statsmodels gives the most promising result:

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!

Yes!!! 0.7.0! give me that! why is server not saying hello?

I have also tried !easy_install -U scikits.statsmodels and many other variations, without success.

Bottomline/TL;DR - I need to upgrade my statsmodels to 0.7.0 and pip install --upgrade and easy_install -U won't let me. I think easy_install -U gets me closest to the goal but fails there and I cannot figure out why. I don't think I'm technically able enough to compile the raw code from https://github.com/statsmodels/statsmodels/. Could you please advise the best way for a newbie to fix this one simple problem?

1条回答
叛逆
2楼-- · 2019-09-19 02:18

There is no release available with 0.7.0; which is why you cannot install it from pip.

You can visit the PyPi page for the module to find out what are all the published releases.

To solve the problem, you can install the development trunk. Thankfully the group releases windows binaries and you can find one compatible with your version of Python.

查看更多
登录 后发表回答