I have installed python39 on the RHEL6 using source.
https://docs.python.org/3/using/unix.html#on-linux
After the setup was completed I was trying to get the version of various python on the Operating system through a non-root user but it results below :
[ec2-user@ip-xx-xx-xx-xx ~]$ whereis python3
python3: /usr/local/bin/python3.9 /usr/local/bin/python3.9-config /usr/local/lib/python3.9
[ec2-user@ip-xx-xx-xx-xx ~]$ whereis python
python: /usr/bin/python /usr/bin/python2.6 /usr/lib/python2.6 /usr/lib64/python2.6 /usr/local/bin/python3.9 /usr/local/bin/python3.9-config /usr/local/lib/python3.9 /usr/include/python2.6 /usr/share/man/man1/python.1.gz
[ec2-user@ip-xx-xx-xx-xx ~]$ sudo python3 -V
sudo: python3: command not found
[ec2-user@ip-xx-xx-xx-xx ~]$ sudo python3.9 -V
python3.9: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
[ec2-user@ip-xx-xx-xx-xx ~]$ sudo python -V
Python 2.6.6
I am looking for the assistance on why the non-root user not able to execute python3 version.