Unable to upgrade Python 3.8.10 to 3.10 - SOLVED

Hi,

I tried to upgrade Python 3.8.10 to 3.10 on Ubuntu :

Ubuntu 20.04.4 LTS

but we hit a blocker and wondering whether anyone is able to upgrade it successfully. We basically followed the following page for instructions:

When we reached 2nd command in Step 3: Add Python 3.8 & Python 3.10 to update-alternatives, we see this error.

$ sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 2
update-alternatives: error: alternative path /usr/bin/python3.10 doesn't exist

we created

/usr/bin/python3.10

directory manually as per the above prompted error but that does not help. So I ended up here and see if anyone can help us.

Best regards,
~Ram