CentOS Stream 8
Sponsored Link

Python 3.6 : Install2021/03/15

 
Install Python 3.6.
[1] It's possible to install Python 3.6 from AppStream.
[root@dlp ~]#
dnf module -y install python36

Dependencies resolved.
================================================================================
 Package       Arch     Version                               Repository   Size
================================================================================
Installing group/module packages:
 python36      x86_64   3.6.8-2.module_el8.4.0+666+456f5f48   appstream    19 k
Installing dependencies:
 python3-pip   noarch   9.0.3-19.el8                          appstream    20 k
Installing module profiles:
 python36/common

Enabling module streams:
 python36               3.6

Transaction Summary
================================================================================
Install  2 Packages
.....
.....

[root@dlp ~]#
python3 -V

Python 3.6.8

# verify to create test script

[root@dlp ~]#
echo -e "import sys\nprint(sys.version)" > python3_test.py

[root@dlp ~]#
python3 python3_test.py

3.6.8 (default, Jan 27 2021, 01:17:18)
[GCC 8.4.1 20200928 (Red Hat 8.4.1-1)]
[2] If you'd like to use [python] command which does not have version number, it's possible to switch them with [alternatives].
[root@dlp ~]#
alternatives --config python

There are 3 programs which provide 'python'.

  Selection    Command
-----------------------------------------------
*+ 1           /usr/libexec/no-python
   2           /usr/bin/python3
   3           /usr/bin/python2

Enter to keep the current selection[+], or type selection number: 2

[root@dlp ~]#
python -V

Python 3.6.8
Matched Content