【发布时间】:2017-02-23 10:52:21
【问题描述】:
我正在使用预装了 python 2.7.6 的远程 linux 服务器。我想升级到 python 2.7.12(因为下面显示的一些 ssl 错误,我无法在 2.7.6 上安装一些库)。
我从源代码下载并编译并安装了 2.7.12,python2.7 打开 2.7.12。但是,我在使用 pip 时仍然收到更新 python 版本警告。 pip 似乎没有与 2.7.12 同步并继续为 2.7.6 提供服务,我无法在系统中找到其他 pip 安装。
我只想要一个 pip/pip2/pip2.7 正常工作的 python2.7.x 工作版本。
/usr/local/lib/python2.7/dist-packages/pip-8.1.2-py2.7.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
SNIMissingWarning
/usr/local/lib/python2.7/dist-packages/pip-8.1.2-py2.7.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
【问题讨论】:
-
那台机器有openSSL吗?大多数情况下,python 会发出此警告,但仍会安装软件包。它能够将东西安装到您的系统中吗?
-
不,不是。我尝试安装
sklearn,它抛出了很多异常,现在它显示它已安装。但是 sklearn 坏了,不能工作。 -
能否安装 urllib3、pyOpenSSL 和 openSSL,然后再尝试安装软件包?
-
@ar7 我已经看到了这个错误,如果我没记错的话,这是一个过时的
pip的问题,正如 OP 猜测的那样。升级pip通常是解决方案。 -
我不明白您的错误消息中的路径:它们似乎指向最近的 pip 版本和手动安装的 Python 2。这对我来说并不表示 Python 2.7.6。
标签: python linux python-2.7 pip