在 python2.7.5 上安装 pip 和旧版本问题
installing pip on python2.7.5 and the old version issue
我想对使用 python2.7.5 开发的代码进行一些更改
所以我应该使用 Python 2.7.5。
但是当我在 python2.7.5 上安装 pip 时,遇到这个错误。
我已经通过cmd下载了get-pip.py和运行
这是错误:
弃用:Python 2.7 已于 2020 年 1 月 1 日结束。请升级您的 Python,因为 Python 2.7 不再维护。 pip 21.0 将在 2021 年 1 月停止支持 Python 2.7。有关 pip 中 Python 2 支持的更多详细信息,请参见 https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 将删除对此功能的支持。
enter image description here
这是否意味着我们不能再使用 Python2??
可以使用 python 3,但您应该使用 2to3 包转换 python 2 代码。
为此,您可以在 python 3 中使用 pip 安装 2to3。
打开命令提示符并使用此命令:
pip 安装 2to3
您应该提前安装 pip。
祝你好运!
尝试使用 python 2.7.12 或更高版本,您可以 运行 python python2
中的所有代码
我想对使用 python2.7.5 开发的代码进行一些更改 所以我应该使用 Python 2.7.5。 但是当我在 python2.7.5 上安装 pip 时,遇到这个错误。 我已经通过cmd下载了get-pip.py和运行 这是错误: 弃用:Python 2.7 已于 2020 年 1 月 1 日结束。请升级您的 Python,因为 Python 2.7 不再维护。 pip 21.0 将在 2021 年 1 月停止支持 Python 2.7。有关 pip 中 Python 2 支持的更多详细信息,请参见 https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 将删除对此功能的支持。 enter image description here 这是否意味着我们不能再使用 Python2??
可以使用 python 3,但您应该使用 2to3 包转换 python 2 代码。 为此,您可以在 python 3 中使用 pip 安装 2to3。 打开命令提示符并使用此命令: pip 安装 2to3 您应该提前安装 pip。 祝你好运!
尝试使用 python 2.7.12 或更高版本,您可以 运行 python python2
中的所有代码