Pandas中的OLS导入失败; easy_install找到了正确的包但由于某种原因失败

2024-10-02 00:35:06 发布

您现在位置:Python中文网/ 问答频道 /正文

这可能是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和{}不允许我这样做。我认为easy-uninstall-U可以让我离目标最近,但是失败了,我不知道为什么。我认为我没有足够的技术能力从https://github.com/statsmodels/statsmodels/编译原始代码。你能告诉新手解决这个简单问题的最佳方法吗?在


Tags: installpipinorgpypihttpforpackages
1条回答
网友
1楼 · 发布于 2024-10-02 00:35:06

0.7.0没有可用的版本;这就是为什么不能从pip安装它。在

您可以访问PyPi page for the module来了解所有发布的版本。在

要解决这个问题,可以安装开发主干。谢天谢地,小组发布了windows binaries,您可以找到一个与您的Python版本兼容的版本。在

相关问题 更多 >

    热门问题