Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
569 views
in Technique[技术] by (71.8m points)

Will PIP work for python 2.7 after its End of Life on 1st Jan 2020

Python 2.7 is reaching its end of life on 1st Jan, 2020 as mentioned by

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

https://pythonclock.org/

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 run pip install abc==1.2.3 after that date?

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

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

pip install --upgrade "pip < 21.0"

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.

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

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

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...