Python 3.9 : Install2021/09/22 |
Install Python.
|
|
[1] | Install Python 3.9. |
root@dlp:~#
apt -y install python3.9
root@dlp:~#
python3 -V Python 3.9.2 # verify to run test script root@dlp:~# echo -e "import sys\nprint(sys.version)" > python3_test.py root@dlp:~# python3 python3_test.py 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110] |
[2] | If you'd like to use [python3] command as a [python] command, configure like follows. |
root@dlp:~# which python3 /usr/bin/python3 root@dlp:~# ll /usr/bin/python3* lrwxrwxrwx 1 root root 9 Apr 5 21:00 /usr/bin/python3 -> python3.9 -rwxr-xr-x 1 root root 5479736 Mar 1 2021 /usr/bin/python3.9
root@dlp:~#
root@dlp:~# update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1 update-alternatives: using /usr/bin/python3.9 to provide /usr/bin/python (python) in auto mode ll /usr/bin/python lrwxrwxrwx 1 root root 24 Sep 21 19:17 /usr/bin/python -> /etc/alternatives/pythonroot@dlp:~# python -V Python 3.9.2 |