upgrade of pip on my python 2.7 version

Thomas Passin list1 at tompassin.net
Thu Sep 28 11:43:25 EDT 2023


On 9/28/2023 9:23 AM, Zuri Shaddai Kuchipudi via Python-list wrote:
> On Wednesday, 27 September 2023 at 23:33:02 UTC+2, Chris Angelico wrote:
>> On Thu, 28 Sept 2023 at 07:27, Mats Wichmann via Python-list
>> <pytho... at python.org> wrote:
>>>
>>> Upgrading to Python 3 is the best answer... except when it isn't. If
>>> you want to convert a small project it's usually not too hard; and using
>>> a conversion tool can work well.
>> Just remember that Python 2.7.18, the very last version of Python 2,
>> was released in 2020 and has not changed since. There are not even
>> security patches being released (at least, not from python.org - but
>> if you're using a different distribution of Python, you are also quite
>> possibly using their package manager rather than pip). Staying on a
>> version of Python that hasn't had new features since 2010 and hasn't
>> had bug fixes since 2020 is going to become increasingly problematic.
>>
>> Convert your code. Pay the price in development time now and then reap
>> the benefits, rather than paying the price when you run into a massive
>> issue somewhere down the track and there's no options left to you.
>>
>> Convert while you still have the luxury of running the old code.
>>
>> ChrisA
> but how do i convert it chris just downloading the python version 3 will solve my issue? and what about the changes

You have to modify your existing Python code.  It's often easy to do. 
There is the tool that tries to convert from Python 2 to Python 3; you 
may need to do some extra work after that.  Depending on the code you 
may even be able to make it work with both Python 2.7 and 3.x.  Often 
the biggest change is to print statements:

Python 2:
print a, b, c

Python3:
print(a, b, c)

If you are very unlucky, your code will depend on some package that has 
never been ported to Python 3.  But that would be unusual.



More information about the Python-list mailing list