首页 > 解决方案 > 不能再用 python 2.7 安装 pip 了?

问题描述

我想使用与 python 2.7(但不是 3.8)兼容的 python 脚本

我需要 pip 才能使脚本正常工作,但看起来我不能再安装 pip 了?我尝试使用 get-pip.py ,但它不起作用:

user@DESKTOP-J9T7UBF
$ get-pip.py
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
c:\users\user\appdata\local\temp\tmp2kztqk\pip.zip\pip\_vendor\urllib3\util\ssl_.py:387: SNIMissingWarning: An HTTPS request has been made, but the SNI (Server 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.io/en/latest/advanced-usage.html#ssl-warnings

标签: pythonpipeol

解决方案


pip install --upgrade "pip < 21.0"

推荐阅读