You should use Python 3 going forward. As of January 2020, Python 2 will be in EOL (End Of Life) status and receive no further official support. After that date, there will be no further updates nor bugfixes. Since this end-of-life date has been planned for nearly a decade (the first end-of-life date was slated to happen in 2014, and was pushed back to 2020), and nearly all popular libraries have already ported their code, Python 2.x is well on its way to obsolescence. As such, we can only recommend learning and teaching Python 3. Now, Python 2.x is legacy but Python 3.x is the future.

Now, I think you should have to upgrade your python versions.

Step 1:- Install ppa

$ sudo add-apt-repository ppa:deadsnakes/ppa

Step 2:- Update packeges

$ sudo apt-get update

Step 3:- Upgrade python 2.x to python 3.x

$ sudo apt-get install python3.6
$ sudo apt-get install python3.7

PiP installation

$ sudo apt install python3-pip

Set priority

$ sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1$ sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 2

Now, you can use python 2.7, 3.6 and 3.7 in your machine.

Post a Comment

Previous Post Next Post