这可能是pandas ols import broken?的后续问题
我使用的是Python2.7,遇到了完全相同的问题,但在解决问题上没有Peter那么成功。在
主要问题是statsmodels的稳定版本是0.6.1。(根据http://statsmodels.sourceforge.net/)。Pandas使用的OLS函数来自statsmodels.api它只在开发版本0.7.0中可用。我发现很难相信2(或更多,如果我的一些搜索结果是可信的!)熊猫还坏了多少年?在
@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
尽管statsmodels在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
和其他许多变体,但没有成功。在
底线/TL;DR-我需要将我的statsmodels升级到0.7.0,pip install --upgrade
和{
0.7.0没有可用的版本;这就是为什么不能从
pip
安装它。在您可以访问PyPi page for the module来了解所有发布的版本。在
要解决这个问题,可以安装开发主干。谢天谢地,小组发布了windows binaries,您可以找到一个与您的Python版本兼容的版本。在
相关问题 更多 >
编程相关推荐