Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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.

like image 856
auny Avatar asked Feb 27 '19 22:02

auny


People also ask

How long will Python 2.7 be supported?

As of January 1st, 2020 no new bug reports, fixes, or changes will be made to Python 2, and Python 2 is no longer supported. A few changes were made between when we released Python 2.7. 17 (on October 19th, 2019) and January 1st.

What versions of Python does pip support?

Getting Started With pip. Package management is so important that Python's installers have included pip since versions 3.4 and 2.7. 9, for Python 3 and Python 2, respectively. Many Python projects use pip , which makes it an essential tool for every Pythonista.

Does pip work Python 2 and 3?

Install pip3 Ubuntu and Debian LinuxUbuntu 18.04 has both Python 2 and Python 3 installed by default, and hence has two pip variants for each Python version. 'pip', refers to Python 2. pip3 refers to Python 3. Ubuntu 20.4 has only Python 3, but still requires a separate python-pip 3 installation.

Does Python 2.7 5 have pip?

pip no longer supports Python 2.7. 5. You need to upgrade to a newer version of Python (2.7. 9 or later for now, but pip will drop support for Python 2 early in 2021).


1 Answers

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.

like image 170
phd Avatar answered Oct 03 '22 16:10

phd