I have installed Python38 on aws EC2 linux, and set it as default by running sudo alternatives --set python /usr/bin/python3.8, but still not working. Python2.7 still the default.
Python is preinstalled on Linux as python 2.7. To run python 3 use the command python3 script.py. This calls upon the python 3 interpreter while python script.py calls upon the python 2.7 interpreter.
Python3 not set as default on AWS EC2 linux