Uploaded on Mar 8, 2023
Sometimes you may need to upgrade python. Here are the steps to upgrade python in Ubuntu. #python #ubuntu Visit https://techimbo.com/how-to-upgrade-python-in-ubuntu/
How to Upgrade Python in Ubuntu
How To Upgrade
Python in Ubuntu
Install ppa
Open terminal and run the following command to install the right PPA for python 3.6,
3.7.
$ sudo add-apt-repository ppa:deadsnakes/ppa
Update system packages
Run the following command to update system packages
$ sudo apt-get update
Upgrade Python 2.x to 3.x
First we need to upgrade python to 3.6 and then python 3.7
$ sudo apt-get install python3.6
$ sudo apt-get install python3.7
Install pip
Install PIP for python 3.x
$ sudo apt install python3-pip
Set Priority
Since we have multiple python versions on our system, we will assign priority for them.
$ 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
Thank You
Visit for details
https://techimbo.com/how-to-upgrade-python-in-ubuntu/
Comments