本文介绍了2020年1月1日终止生命后,PIP将在python 2.7中工作吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

https://legacy.python.org/dev/peps/pep-0373 /

https://pythonclock.org/

在该日期之后,当前的pip是否将继续为python 2.7工作?它已经显示了弃用python 2.7的消息.我们能跑吗pip install abc==1.2.3在那之后?

Will current pip keep on working for python 2.7 after that date? It is already showing the msg for deprecation of python 2.7. Will we be able to runpip install abc==1.2.3 after that date?

我们确实了解,在停产之后,将不再为2.7进行任何新的修复/支持,因此这里不再关注.

We do understand that after EOL, no new fixes/support will be done for 2.7, so that is not the concern here.

问题源于即使在EOL之后仍希望继续在python 2.7上运行的愿望.

The question stems from the desire to keep running on python 2.7 even after EOL.

推荐答案

您需要确保具有适用于Python 2.7的pip版本:

You need to make sure you have the right version of pip for Python 2.7:

pip install --upgrade "pip < 19.1"

该版本将运行一段时间.迟早它们会失败,因为PyPI主机将SSL配置更改为Python 2.7无法处理的配置.但是我敢肯定我们还有几年的时间.

That versions will be working for some time. Sooner or later they fail because PyPI host changes SSL configuration to one that Python 2.7 doesn't handle. But I'm sure we have a few years before that.

重要工具的一些其他版本限制,以保持与Python 2.7的兼容性:

A few additional version limits for important tools to retain compatibility with Python 2.7:

pip install --upgrade "Sphinx < 2.0" "pytest < 5.0"

如果您使用其他工具,请完全按照其声明进行操作,以使它们停止支持2.7.

If you use other tools follow their announcements thoroughly to catch them stopping supporting 2.7.

这篇关于2020年1月1日终止生命后,PIP将在python 2.7中工作吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-22 23:36