How to upgrade python 3.8.0 to 3.8.3 in ubuntu 18.04

Viewed 5416

I have Ubuntu 18.04 and I upgraded the python version from 3.6 to 3.8. However the python version it installed was 3.8.0 and I want 3.8.3.

$ sudo python3 --version
Python 3.8.0

How do I upgrade to 3.8.3?

3 Answers

You can use the deadsnakes PPA to install it. The latest version for 18.04 is currently 3.8.3-1+bionic1.

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.8

However, you should make sure that python3 points to the system version of Python (i.e. 3.6), since different versions are not alternatives on Ubuntu, and that can break your system (examples 1, 2, 3). You'll need to use python3.8 to run Python 3.8 in the future.

as the manual says, compile from source , since deb packaging is a bit behind actual releases

Update python3 3.6 to python3 3.8 version Steps:

    1. Check python version python3 -V
    1. sudo add-apt-repository ppa:deadsnakes/ppa sudo apt-get update
    1. apt-get update
    1. Verify the Python updated or not apt list | grep python3.8
    1. Install the Python 3.8 sudo apt-get install python3.8
    1. sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1 sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 2
    1. sudo update-alternatives --config python3
    1. Now type 2 and hit enter
    1. python3 -V

Now you can see python3 updated with 3.8 version.

Related